diff options
Diffstat (limited to 'src/JSON.js')
| -rw-r--r-- | src/JSON.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/JSON.js b/src/JSON.js index 186bdb1c..942ce7c0 100644 --- a/src/JSON.js +++ b/src/JSON.js @@ -35,19 +35,14 @@ function toJson(obj, pretty) { function fromJson(json, useNative) { if (!isString(json)) return json; - var obj, p, expression; + var obj; try { if (useNative && window.JSON && window.JSON.parse) { obj = JSON.parse(json); return transformDates(obj); } - - p = parser(json, true); - expression = p.primary(); - p.assertAllConsumed(); - return expression(); - + return parser(json, true).primary()(); } catch (e) { error("fromJson error: ", json, e); throw e; |
