Explorar o código

Merge pull request #40 from RobertLarsen/master

Fixed JSON format issue
bitwiseshiftleft %!s(int64=14) %!d(string=hai) anos
pai
achega
61228e7c23
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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]) {