How to safely minify a JSON file in C? -
i've taken @ responses in can comments used in json? commenting json files, , general consensus either
- don't
- use data comments
- write comment , minify them
i'd third approach if possible, seems googling json minifier other standard javascript 1 worthless approach problem.
is there json minifier library c? strongly prefer not write 1 myself.
thanks,
most json libraries can both reading (decoding or parsing json) , writing (encoding or printing json). several have options (e.g. indent or not) printing. read json data, , print appropriate flags. should "minify" json
for jansson library see flag json_compact json_dumpf
(and, commented, json_decode_any
json_loads
)
Comments
Post a Comment