Added double quotes around keys in JSON encoded strings to conform with JSON format.

This commit is contained in:
Robert Larsen 2011-11-24 14:23:36 +01:00
parent 3fddb9e668
commit 502d313351

View File

@ -122,7 +122,7 @@
if (!i.match(/^[a-z0-9]+$/i)) {
throw new sjcl.exception.invalid("json encode: invalid property name");
}
out += comma + i + ':';
out += comma + '"' + i + '"' + ':';
comma = ',';
switch (typeof obj[i]) {