Signed-off-by: Felix Fietkau <nbd@openwrt.org>
const char *output;
obj = json_object_new_object();
- jshn_add_objects(obj, "JSON_VAR", false);
+ jshn_add_objects(obj, "J_V", false);
output = json_object_to_json_string(obj);
if (indent) {
blob_buf_init(&b, 0);
local unset tmp
_json_get_var unset JSON_UNSET
- for tmp in $unset JSON_VAR; do
+ for tmp in $unset J_V; do
unset \
${JSON_PREFIX}U_$tmp \
${JSON_PREFIX}K_$tmp \
json_cleanup
export -n ${JSON_PREFIX}JSON_SEQ=0
export -- \
- ${JSON_PREFIX}JSON_CUR="JSON_VAR" \
- ${JSON_PREFIX}K_JSON_VAR=
+ ${JSON_PREFIX}JSON_CUR="J_V" \
+ ${JSON_PREFIX}K_J_V=
}
json_add_object() {
local cur
[ -z "$1" ] && {
- _json_set_var JSON_CUR "JSON_VAR"
+ _json_set_var JSON_CUR "J_V"
return 0
}
[[ "$1" == ".." ]] && {