Closed v0-e closed 8 months ago
This proposes the addition of a new
ATS_JER_MINIFIED
to produce more lightweight JSONs without whitespaces
I would strongly object to replacing the current JSON with "minified". But adding "minified as an option seems reasonable.
The output of the current default
ATS_JER
remains unchanged (pretty-printing).
Which is what makes this PR viable.
a more compact JSON is both smaller and faster to decode, so depending on the application it can be preferable to be used over the pretty format.
I'm not sure I see a use case. On the other hand - since it doesn't seem to hurt anything, and somebody seems to benefit from it - why not.
Let me know if you would like to change the name of the ATS(s).
We can do that later, if objections come in. Otherwise, ATS_JER_MINIFIED
looks as good as any.
Thanks!
Please feel free to add tests for this. A separate PR for tests is fine.
This proposes the addition of a new
ATS_JER_MINIFIED
to produce more lightweight JSONs without whitespaces. The output of the current defaultATS_JER
remains unchanged (pretty-printing).The JER standard (X.697) does not define either a pretty or a minified JSON, stating only that JER-compliant JSONs can have any number of whitespaces between tokens. The examples that it provides are based on a pretty format, so I think we should preserve the
ATS_JER
for the pretty encoding. Nevertheless, a more compact JSON is both smaller and faster to decode, so depending on the application it can be preferable to be used over the pretty format.Let me know if you would like to change the name of the
ATS
(s).This PR is an alternative to #108.
Example with
ATS_JER
:Example with
ATS_JER_MINIFIED
: