Преглед изворни кода

Merge pull request #40 from RobertLarsen/master

Fixed JSON format issue
bitwiseshiftleft пре 14 година
родитељ
комит
61228e7c23
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      core/convenience.js

+ 1 - 1
core/convenience.js

@@ -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]) {