Browse Source

Merge pull request #40 from RobertLarsen/master

Fixed JSON format issue
bitwiseshiftleft 14 năm trước cách đây
mục cha
commit
61228e7c23
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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]) {