Skip to content

[Frida Util] Consider using valid JSON vs NDJSON #3404

@cpholguera

Description

@cpholguera

The current output uses NDJSON (Newline Delimited JSON) which writes individual JSON objects one after another, without wrapping them in a proper JSON array.

{
  "id": "4e2239c7-9f0d-4174-82f6-929895ee990c",
  ...
}
{
  "id": "907013e5-c9f1-40e0-9a45-c3294e7a2288",
  ...
}

This is fine as it can be consumed by jq (not sure about other tools).

Alternatively, the output could be a valid JSON array containing all result objects:

[
  {
    "id": "4e2239c7-9f0d-4174-82f6-929895ee990c",
    ...
  },
  {
    "id": "907013e5-c9f1-40e0-9a45-c3294e7a2288",
    ...
  }
]

Should we do something like ..?

jq -s '.' output.json > output_fixed.json && mv output_fixed.json output.json

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions