Fixed: [CLI Show config JSON with multiple top-level elements is broken](https://github.com/clicon/clixon/issues/381)

C API: Added skiptop parameter to xml2json_vec
This commit is contained in:
Olof hagsand 2022-10-28 15:13:41 +02:00
parent 097aeb0320
commit 83f71529d7
8 changed files with 94 additions and 40 deletions

View file

@ -67,7 +67,7 @@ new "json parse empty list to xml"
expecteofx "$clixon_util_json" 0 '{"a":[]}' "<a/>"
new "json parse list json" # should be {"a":[0,1,2,3]}
expecteofx "$clixon_util_json -j" 0 '{"a":[0,1,2,3]}' '{"a":"0"}{"a":"1"}{"a":"2"}{"a":"3"}'
expecteofx "$clixon_util_json -j" 0 '{"a":[0,1,2,3]}' '{"a":"0"},{"a":"1"},{"a":"2"},{"a":"3"}'
# Multi-line JSON not pretty-print
JSON='{"json:c":{"a":42,"s":"string"}}'