]> git.corax.cc Git - toolbox/commit
include/json: Fix parsing of output from jq in json_array_tail()
authorMatthias Kruk <m@m10k.eu>
Sat, 7 Jan 2023 08:33:53 +0000 (17:33 +0900)
committerMatthias Kruk <m@m10k.eu>
Sat, 7 Jan 2023 08:37:37 +0000 (17:37 +0900)
commita0cb075b70ca2367c7f105c37217de3a844d0563
tree2aa8d972ba83ab51582f6171b329f6357af2bf34
parent7209457792db2a23282dfd39c148e0ffcc4e2b40
include/json: Fix parsing of output from jq in json_array_tail()

The `json_array_tail()' function does not correctly handle return
values and parse output from jq, causing it to incorrectly handle
arrays that contain arrays or objects.

This commit modifies `json_array_tail()' so that it correctly
recognizes the type of data read from jq.
include/json.sh
test/json_spec.sh