Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

events: outputs invalid JSON #1539

Closed
leighmcculloch opened this issue Aug 12, 2024 · 0 comments · Fixed by #1554
Closed

events: outputs invalid JSON #1539

leighmcculloch opened this issue Aug 12, 2024 · 0 comments · Fixed by #1554
Assignees
Labels
bug Something isn't working

Comments

@leighmcculloch
Copy link
Member

leighmcculloch commented Aug 12, 2024

What version are you using?

v21.3.0

What did you do?

Requested the output of events in JSON form:

$ stellar events --start-ledger 1000515 --output json
{
  "type": "diagnostic",
  "ledger": 1000515,
  "ledgerClosedAt": "2024-08-11T18:20:19Z",
  "id": "0004297179204177920-0000000000",
  "pagingToken": "0004297179204177920-0000000000",
  "contractId": "",
  "topic": [
    "AAAADwAAAAdmbl9jYWxsAA==",
    "AAAADQAAACBVkqNeeMWaJ6fGFVD0NhNxSTQdXVfI6TONZODy5H/xvg==",
    "AAAADwAAAAlzZXRfcHJpY2UAAAA="
  ],
  "value": "AAAAEAAAAAEAAAACAAAAEAAAAAEAAAAQAAAACgAAAAAAAAAAU7CiG+HJShAAAAAKAAAAAAAAAAADqvucLHjDIgAAAAoAAAAAAAAAAAAAWvzqKM15AAAACgAAAAAAAAAAAAAz7BHJ4iwAAAAKAAAAAAAAAAAANOdwTbnMWQAAAAoAAAAAAAAAAAAAWvKqC0vOAAAACgAAAAAAAAAAAAAfDiD/rEgAAAAKAAAAAAAAAAAAB4yGUE68jgAAAAoAAAAAAAAAAAABpOHhhG/JAAAACgAAAAAAAAAAAAAmGsNlXeQAAAAKAAAAAAAAAAAAA7ZGtuJERAAAAAoAAAAAAAAAAAAAWvHB1yXiAAAACgAAAAAAAAAAAAHKF+UGqFIAAAAKAAAAAAAAAAAAAAkcwiD1iQAAAAoAAAAAAAAAAAACLe/o7dfAAAAACgAAAAAAAAAAAABj8qDTiisAAAAFAAABkUKrLIA="
}
...
{
  "type": "diagnostic",
  "ledger": 1000515,
  "ledgerClosedAt": "2024-08-11T18:20:19Z",
  "id": "0004297179204177920-0000000009",
  "pagingToken": "0004297179204177920-0000000009",
  "contractId": "",
  "topic": [
    "AAAADwAAAAxjb3JlX21ldHJpY3M=",
    "AAAADwAAAA93cml0ZV9kYXRhX2J5dGUA"
  ],
  "value": "AAAABQAAAAAAAAs8"
}
Latest Ledger: 1005534

What did you expect to see?

JSON.

What did you see instead?

JSON, followed by text appended at the end. Both are outputted to stdout, meaning the output of the command cannot be used as is and piped to programs that accept JSON.

@leighmcculloch leighmcculloch added the bug Something isn't working label Aug 12, 2024
willemneal added a commit to AhaLabs/stellar-cli that referenced this issue Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants