]> git.corax.cc Git - toolbox/commit
include/json: Make json_array_to_lines() use compact JSON notation
authorMatthias Kruk <m@m10k.eu>
Sat, 7 Jan 2023 08:38:54 +0000 (17:38 +0900)
committerMatthias Kruk <m@m10k.eu>
Sat, 7 Jan 2023 08:38:54 +0000 (17:38 +0900)
commit73c7ba2b9f9801b4cfdd67ef51ddf3e512bb1f4d
tree1f7c062938fbd8079962fe4f122c858d059e68b0
parenta0cb075b70ca2367c7f105c37217de3a844d0563
include/json: Make json_array_to_lines() use compact JSON notation

Because the whitespace that is printed by jq when outputting arrays
and objects in non-compact notation does not match the whitespace
that is expected by the test cases, the tests fail.

This commit modifies the `json_array_to_lines()' function so that it
outputs data in compact JSON notation, and changes the test cases so
they do not expect any whitespace at all.
include/json.sh
test/json_spec.sh