]> git.corax.cc Git - toolbox/commit
include/json: Allow false booleans to be retrieved from JSON types
authorMatthias Kruk <m@m10k.eu>
Tue, 6 Jul 2021 22:56:43 +0000 (07:56 +0900)
committerMatthias Kruk <m@m10k.eu>
Tue, 6 Jul 2021 22:56:43 +0000 (07:56 +0900)
commit097109bfb7f0797c33beeadd6bf988b608a95e24
treedf0cd58e2f0a7265d02813a074031d8166449d96
parente070a1c5b739cf94008b8a763c683f26b1538f2f
include/json: Allow false booleans to be retrieved from JSON types

Because of the way the return value of jq is checked in
json_object_get() and json_array_head(), the functions will fail if a
value of (boolean) "false" was retrieved from the JSON type.
This commit fixes the behavior of json_object_get() and
json_array_head() so that false booleans can be retrieved.
include/json.sh