Function web_gen_json sometimes adds an extra comma
Closed this issue · 2 comments
titobrasolin commented
It's something I noticed when a REST server refused my POST (a serialized struct) because of an invalid JSON.
E.g. I'm pasting here the JSON generated within rci_save_stored: that final comma ("... },}") would make it invalid even if all flags (WGJ_SQUASH_KEY etc.) were off.
{_RCI_Settings:{interface:[{name:"eth0",dhcp:1,ip:0,subnet:4294967040,gateway:0,
eth_speed:0,eth_duplex:0,autoip:0,addp:0,static:0,channel:0,protocol_mode:0,ssid
[...]
onEnabled:1,lastKnownAddressUpdateEnabled:0,serverArray:[{serverAddress:"my.devi
cecloud.com"},{serverAddress:""}]}]},}
tomlogic commented
Thanks for reporting this Tito, I'll look into it soon.