diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-01-07 17:46:31 +0300 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-01-07 17:52:24 +0300 |
commit | 1c08e80313fd487112c48346889cc57badeef751 (patch) | |
tree | 7b691781d2f00e0d94d49b9a4bca66a66d096a0a /sh | |
parent | 729f47fd5279f902986457682f8f166c324eafb5 (diff) |
jshn: properly support JSON "null" type
Instead of abort parsing, properly deal with "null" values by implementing
support for reading and formatting such values.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'sh')
-rw-r--r-- | sh/jshn.sh | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -168,6 +168,12 @@ json_add_double() { _json_add_generic double "$1" "$2" "$cur" } +json_add_null() { + local cur + _json_get_var cur JSON_CUR + _json_add_generic null "$1" "" "$cur" +} + # functions read access to json variables json_load() { |