Merge remote-tracking branch 'origin/master'

This commit is contained in:
nora 2021-07-18 11:00:32 +02:00
commit 8e45eda342

View file

@ -26,7 +26,10 @@ OPTIONS:
-o, --output <output> The output file for the formatted json -o, --output <output> The output file for the formatted json
``` ```
Reads from stdin if no file is supplied.
Outputs to stdout if no output file is specified.
## How? ## How?
`jsonformat` does not actually parse the json, it just loops through each characters and keeps track of some flags. It then copies these characters to the output buffer, adding and removing whitespace. `jsonformat` does not actually parse the json, it just loops through each character and keeps track of some flags. It then copies these characters to the output buffer, adding and removing whitespace.
The code is currently a bit chaotic, but it works and is fast, so good enough for now. Maybe it could profit from SIMD in the future, but I have never used it and I don't know whether it would work. Maybe some day... The code is currently a bit chaotic, but it works and is fast, so good enough for now. Maybe it could profit from SIMD in the future, but I have never used it and I don't know whether it would work. Maybe some day...