Lines Matching defs:a

19     This file creates a global JSON object containing two methods: stringify
26 values are stringified for objects. It can be a
31 be packed without extra whitespace. If it is a number,
33 level. If it is a string (such as '\t' or ' '),
36 This method produces a JSON text from a JavaScript value.
38 When an object value is found, if the object contains a toJSON
76 a replacer function to replace those with JSON values.
79 The optional space parameter produces a stringification of the
83 If the space parameter is a non-empty string, then that string will
84 be used for indentation. If the space parameter is a number, then
104 This method parses a JSON text to produce an object or array.
105 It can throw a SyntaxError exception.
107 The optional reviver parameter is a function that can filter and
119 var a;
121 a =
123 if (a) {
124 return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
125 +a[5], +a[6]));
145 This is a reference implementation. You are free to copy, modify, or
159 // Create a JSON object only if one does not already exist. We create the
160 // methods in a closure to avoid creating global variables.
219 return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
220 var c = meta[a];
223 : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
230 // Produce a string from holder[key].
240 // If the value has a toJSON method, call it to obtain a replacement value.
247 // If we were called with a replacer function, then call the replacer to
248 // obtain a replacement value.
269 // If the value is a boolean or null, convert it to a string. Note:
280 // Due to a specification blunder in ECMAScript, typeof null is 'object',
296 // The value is an array. Stringify every element. Use null as a placeholder
356 // If the JSON object does not yet have a stringify method, give it one.
361 // The stringify method takes a value and an optional replacer, and an optional
362 // space parameter, and returns a JSON text. The replacer can be a function
371 // If the space parameter is a number, make an indent string containing that
379 // If the space parameter is a string, it will be used as the indent string.
385 // If there is a replacer, it must be a function or an array.
395 // Make a fake root object containing our value under the key of ''.
403 // If the JSON object does not yet have a parse method, give it one.
408 // The parse method takes a text and an optional reviver function, and returns
409 // a JavaScript value if the text is a valid JSON text.
442 text = text.replace(cx, function (a) {
444 ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
455 // replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
457 // open brackets that follow a colon or comma or that begin the text. Finally,
462 .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
466 // In the third stage we use the eval function to compile the text into a
467 // JavaScript structure. The '{' operator is subject to a syntactic ambiguity
468 // in JavaScript: it can begin a block or an object literal. We wrap the text
474 // each name/value pair to a reviver function for possible transformation.
481 // If the text is not JSON parseable, then a SyntaxError is thrown.