Libubox/jshn.sh and escaping?

We wanted to change security settings with a script

# delete "methods": [ "cookie:sysauth" ]
json_init
json_load_file /usr/share/luci/menu.d/luci-base.json
json_select "admin/menu"
json_add_object "auth"
json_close_object
NEW_JSON=`json_dump`
echo $NEW_JSON > /usr/share/luci/menu.d/luci-base.json

This will completely destroy the json, e.g. it will replace "admin/menu" with "admin_menu" and "ubus*" with "ubus_".

A minimal variant that has the same effect:

json_init
json_load_file /usr/share/luci/menu.d/luci-base.json
json_dump