aboutsummaryrefslogtreecommitdiffstats
path: root/src/JSON.js
diff options
context:
space:
mode:
authorMisko Hevery2010-10-15 15:28:58 -0700
committerMisko Hevery2010-10-18 08:50:36 -0700
commit9e9bdbdc405b6afecd2e536e375c9d8fe40f110b (patch)
tree89bd9cdeb19782a6d449c931ae4688e5617a562e /src/JSON.js
parent352dbfa38fca660a80d6fae2c6e810f820247791 (diff)
downloadangular.js-9e9bdbdc405b6afecd2e536e375c9d8fe40f110b.tar.bz2
JSON parser is now strict (ie, expressions are not allowed for security)
Close #57
Diffstat (limited to 'src/JSON.js')
-rw-r--r--src/JSON.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/JSON.js b/src/JSON.js
index 4b1326b2..8606319a 100644
--- a/src/JSON.js
+++ b/src/JSON.js
@@ -9,9 +9,9 @@ function toJson(obj, pretty){
function fromJson(json) {
if (!json) return json;
try {
- var parser = new Parser(json, true);
- var expression = parser.primary();
- parser.assertAllConsumed();
+ var p = parser(json, true);
+ var expression = p.primary();
+ p.assertAllConsumed();
return expression();
} catch (e) {
error("fromJson error: ", json, e);