Commit 3800362c77c2beffeb08b5c30bcbc4c085e2929b

Authored by totoro
1 parent ccaf60cc

Fix Json output format, to be able to compliant with JSON description

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
web/CXM_json.anubis
@@ -126,7 +126,7 @@ public define Printable_tree @@ -126,7 +126,7 @@ public define Printable_tree
126 JsonMember member 126 JsonMember member
127 ) = 127 ) =
128 if member is json_member(name, value) then 128 if member is json_member(name, value) then
129 - [ "'", name, "':" . format_json(value) ]. 129 + [ "\"", name, "\":" . format_json(value) ].
130 130
131 131
132 define Printable_tree 132 define Printable_tree
@@ -162,7 +162,7 @@ public define Printable_tree @@ -162,7 +162,7 @@ public define Printable_tree
162 json_array(values) then [ "[", format_json_array(values), "]" . [] ], 162 json_array(values) then [ "[", format_json_array(values), "]" . [] ],
163 json_int(i) then int_pt(i, []), 163 json_int(i) then int_pt(i, []),
164 json_float(f, p) then str_pt(float_to_string(f, p), []), 164 json_float(f, p) then str_pt(float_to_string(f, p), []),
165 - json_string(s) then str_pt("'" + format_json_esc(s) + "'", []), 165 + json_string(s) then str_pt("\"" + format_json_esc(s) + "\"", []),
166 json_bool(b) then str_pt(if b then "true" else "false", []), 166 json_bool(b) then str_pt(if b then "true" else "false", []),
167 json_null then str_pt("null", []) 167 json_null then str_pt("null", [])
168 }. 168 }.