summaryrefslogtreecommitdiff
path: root/share/www/script/json2.js
diff options
context:
space:
mode:
Diffstat (limited to 'share/www/script/json2.js')
-rw-r--r--share/www/script/json2.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/share/www/script/json2.js b/share/www/script/json2.js
index 48c55361..a1a3b170 100644
--- a/share/www/script/json2.js
+++ b/share/www/script/json2.js
@@ -1,6 +1,6 @@
/*
http://www.JSON.org/json2.js
- 2009-08-17
+ 2010-03-20
Public Domain.
@@ -8,6 +8,14 @@
See http://www.JSON.org/js.html
+
+ This code should be minified before deployment.
+ See http://javascript.crockford.com/jsmin.html
+
+ USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
+ NOT CONTROL.
+
+
This file creates a global JSON object containing two methods: stringify
and parse.
@@ -136,15 +144,9 @@
This is a reference implementation. You are free to copy, modify, or
redistribute.
-
- This code should be minified before deployment.
- See http://javascript.crockford.com/jsmin.html
-
- USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
- NOT CONTROL.
*/
-/*jslint evil: true */
+/*jslint evil: true, strict: false */
/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
@@ -153,7 +155,6 @@
test, toJSON, toString, valueOf
*/
-"use strict";
// Create a JSON object only if one does not already exist. We create the
// methods in a closure to avoid creating global variables.
@@ -432,6 +433,7 @@ if (!this.JSON) {
// Unicode characters with escape sequences. JavaScript handles many characters
// incorrectly, either silently deleting them, or treating them as line endings.
+ text = String(text);
cx.lastIndex = 0;
if (cx.test(text)) {
text = text.replace(cx, function (a) {