1
0
Эх сурвалжийг харах

Merge pull request #40 from RobertLarsen/master

Fixed JSON format issue
bitwiseshiftleft 15 жил өмнө
parent
commit
61228e7c23

+ 1 - 1
core/convenience.js

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