-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Invalid JSON with multiple top-level objects #2902
Labels
Comments
3 tasks
As discussed in office hours, it seems we've inadvertently implemented ndjson (https://github.com/ndjson/ndjson-spec). Since ndjson is a real thing, perhaps the test runner should just properly support it |
jordalgo
pushed a commit
to jordalgo/bpftrace
that referenced
this issue
Mar 15, 2024
bpftrace can output multiple lines of valid json instead of one large valid json blob. This adds test runner support to check multiple json lines. Related issue: bpftrace#2902
jordalgo
pushed a commit
to jordalgo/bpftrace
that referenced
this issue
Mar 15, 2024
bpftrace can output multiple lines of valid json instead of one large valid json blob. This adds test runner support to check multiple json lines. Added a test for multiple map json output as an example. Related issue: bpftrace#2902
3 tasks
jordalgo
pushed a commit
to jordalgo/bpftrace
that referenced
this issue
Mar 15, 2024
bpftrace can output multiple lines of valid json instead of one large valid json blob. This adds test runner support to check multiple json lines. Added a test for multiple map json output as an example. Related issue: bpftrace#2902
jordalgo
pushed a commit
to jordalgo/bpftrace
that referenced
this issue
Mar 15, 2024
bpftrace can output multiple lines of valid json instead of one large valid json blob. This adds test runner support to check multiple json lines. Added a test for multiple map json output as an example. Related issue: bpftrace#2902
jordalgo
pushed a commit
to jordalgo/bpftrace
that referenced
this issue
Mar 18, 2024
bpftrace can output multiple lines of valid json instead of one large valid json blob. This adds test runner support to check multiple json lines. - Added a test for multiple map json output as an example. - Fixed a currently flakey test: histogram-finegrain Related issues: bpftrace#2902 bpftrace#3035
jordalgo
pushed a commit
to jordalgo/bpftrace
that referenced
this issue
Mar 19, 2024
bpftrace can output multiple lines of valid json instead of one large valid json blob. This adds test runner support to check multiple json lines. - Added a test for multiple map json output as an example. - Fixed a currently flakey test: histogram-finegrain Related issues: bpftrace#2902 bpftrace#3035
jordalgo
pushed a commit
to jordalgo/bpftrace
that referenced
this issue
Mar 19, 2024
bpftrace can output multiple lines of valid json instead of one large valid json blob. This adds test runner support to check multiple json lines. - Added a test for multiple map json output as an example. - Fixed a currently flakey test: histogram-finegrain Related issues: bpftrace#2902 bpftrace#3035
jordalgo
added a commit
that referenced
this issue
Mar 21, 2024
bpftrace can output multiple lines of valid json instead of one large valid json blob. This adds test runner support to check multiple json lines. - Added a test for multiple map json output as an example. - Fixed a currently flakey test: histogram-finegrain Related issues: #2902 #3035 Co-authored-by: Jordan Rome <jordalgo@fedoraproject.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When printing multiple values (e.g. maps) in JSON format, we get a JSON doc with multiple top-level objects which is not a valid JSON according to the standards.
What reproduces the bug? Provide code if possible.
Consider this bpftrace program printing 2 maps and the info about attached probes:
Trying to parse it with Python's JSON parser throws an exception:
To comply with the standard, the output should be:
The text was updated successfully, but these errors were encountered: