Skip to content

Conversation

@cgkantidis
Copy link
Contributor

JSON has wider support than XML across programming languages, so I believe having the option to write the findings in a JSON format make Duplo more versatile, since its output can be consumed by many more tools.

I chose to support JSON by adding a dependancy to the nlohmann/json header-only library, which handles escaping of the lines correctly.

This has the drawback that we keep all the findings in memory (in a json object) instead of writing them directly to the output file.

If this is considered a deal-breaker, we can re-implement all the escaping of the lines ourselves, as is done for XML, and write directly to the output file.

JSON has wider support than XML across programming languages, so I believe
having the option to write the findings in a JSON format make Duplo more
versatile, since its output can be consumed by many more tools.

I chose to support JSON by adding a dependancy to the nlohmann/json header-only
library, which handles escaping of the lines correctly.

This has the drawback that we keep all the findings in memory (in a `json`
object) instead of writing them directly to the output file.

If this is considered a deal-breaker, we can re-implement all the escaping of
the lines ourselves, as is done for XML, and write directly to the output file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant