From 502d3133513a9ba0ea676a758a8b93c27e4f2edd Mon Sep 17 00:00:00 2001 From: Robert Larsen Date: Thu, 24 Nov 2011 14:23:36 +0100 Subject: [PATCH] Added double quotes around keys in JSON encoded strings to conform with JSON format. --- core/convenience.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/convenience.js b/core/convenience.js index de94940..b69a2e7 100644 --- a/core/convenience.js +++ b/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]) {