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

[bug] Issue with parsing JSON #1248

Closed
vojtechjelinek opened this issue Jan 11, 2024 · 0 comments · Fixed by #1250
Closed

[bug] Issue with parsing JSON #1248

vojtechjelinek opened this issue Jan 11, 2024 · 0 comments · Fixed by #1250
Assignees
Labels
bug Something isn't working
Milestone

Comments

@vojtechjelinek
Copy link

Describe the bug
Issue with parsing some JSONs. I'm able to fix this error by adding one newline into the JSON file.

When the contents of the file is:

[{"Event": {"System": {"EventID": "123", "EventRecordID": "1111"}, "UserData": {"AddServiceID": null}}}]

the command fails with:

"path/to/json/logs.json"                                                                                                                           thread 'main' panicked at src/main.rs:1631:22:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0:     0x55b1e53a7193 - <unknown>
   1:     0x55b1e5059a3c - <unknown>
   2:     0x55b1e537057d - <unknown>
   3:     0x55b1e53a873e - <unknown>
   4:     0x55b1e53a8323 - <unknown>
   5:     0x55b1e53a92e9 - <unknown>
   6:     0x55b1e53a8de8 - <unknown>
   7:     0x55b1e53a8d76 - <unknown>
   8:     0x55b1e53a8d61 - <unknown>
   9:     0x55b1e4f42a14 - <unknown>
  10:     0x55b1e4f42be2 - <unknown>
  11:     0x55b1e4fb657f - <unknown>
  12:     0x55b1e4f93c0d - <unknown>
  13:     0x55b1e4f9017d - <unknown>
  14:     0x55b1e4f8a6aa - <unknown>
  15:     0x55b1e52387f3 - <unknown>
  16:     0x55b1e4fbf7d2 - <unknown>
  17:     0x7f2b14829d90 - __libc_start_call_main
                               at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
  18:     0x7f2b14829e40 - __libc_start_main_impl
                               at ./csu/../csu/libc-start.c:392:3
  19:     0x55b1e4f7efd5 - <unknown>
  20:                0x0 - <unknown>

when I modify the file to be:

[
{"Event": {"System": {"EventID": "123", "EventRecordID": "1111"}, "UserData": {"AddServiceID": null}}}]

it starts working.

Step to Reproduce
Steps to reproduce the behavior:

  1. Run RUST_BACKTRACE=full ./hayabusa-2.12.0-lin-x64-gnu csv-timeline -J --file path/to/json/logs.json

Environment (please complete the following information):

  • OS: Ubuntu 22.04.3 LTS
  • hayabusa version: 2.12.0
@vojtechjelinek vojtechjelinek added the bug Something isn't working label Jan 11, 2024
@hitenkoku hitenkoku self-assigned this Jan 11, 2024
@hitenkoku hitenkoku linked a pull request Jan 11, 2024 that will close this issue
hitenkoku added a commit that referenced this issue Jan 20, 2024
hitenkoku added a commit that referenced this issue Jan 20, 2024
…sing-json

fixed json parse error in json input #1248
@hitenkoku hitenkoku added this to the v2.13.0 milestone Jan 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
None yet
Development

Successfully merging a pull request may close this issue.

2 participants