/external/chromium/base/json/ |
json_writer.h | 18 // Given a root node, generates a JSON string and puts it into |json|. 19 // If |pretty_print| is true, return a slightly nicer formated json string 22 // TODO(tc): Should we generate json if it would be invalid json (e.g., 26 std::string* json); 30 // JSON parser in binary form (as UTF8). 34 std::string* json); 36 // A static, constant JSON string representing an empty array. Useful 37 // for empty JSON argument passing [all...] |
json_writer.cc | 5 #include "base/json/json_writer.h" 7 #include "base/json/string_escape.h" 27 std::string* json) { 28 WriteWithOptionalEscape(node, pretty_print, true, json); 35 std::string* json) { 36 json->clear(); 38 json->reserve(1024); 39 JSONWriter writer(pretty_print, json); 42 json->append(kPrettyPrintLineEnding); 45 JSONWriter::JSONWriter(bool pretty_print, std::string* json) [all...] |
json_reader.h | 5 // A JSON parser. Converts strings of JSON into a Value object (see 97 // Reads and parses |json|, returning a Value. The caller owns the returned 98 // instance. If |json| is not a properly formed JSON string, returns NULL. 101 static Value* Read(const std::string& json, bool allow_trailing_comma); 103 // Reads and parses |json| like Read(). |error_message_out| is optional. If 107 static Value* ReadAndReturnError(const std::string& json, 115 // Reads and parses |json|, returning a Value. The caller owns the returned 116 // instance. If |json| is not a properly formed JSON string, returns NULL an [all...] |
/cts/libs/json/src/com/android/json/stream/ |
JsonToken.java | 17 package com.android.json.stream; 20 * A structure, name or value type in a JSON-encoded string. 25 * The opening of a JSON array. Written using {@link JsonWriter#beginObject} 31 * The closing of a JSON array. Written using {@link JsonWriter#endArray} 37 * The opening of a JSON object. Written using {@link JsonWriter#beginObject} 43 * The closing of a JSON object. Written using {@link JsonWriter#endObject} 49 * A JSON property name. Within objects, tokens alternate between names and 56 * A JSON string. 61 * A JSON number represented in this API by a Java {@code double}, {@code 67 * A JSON {@code true} or {@code false} [all...] |
/external/v8/test/mjsunit/ |
json.js | 88 assertEquals(Object.prototype, JSON.__proto__); 89 assertEquals("[object JSON]", Object.prototype.toString.call(JSON)); 93 assertFalse(p == "JSON"); 96 assertEquals({}, JSON.parse("{}")); 97 assertEquals({42:37}, JSON.parse('{"42":37}')); 98 assertEquals(null, JSON.parse("null")); 99 assertEquals(true, JSON.parse("true")); 100 assertEquals(false, JSON.parse("false")); 101 assertEquals("foo", JSON.parse('"foo"')) [all...] |
mirror-unresolved-function.js | 45 var json = JSON.stringify(serializer.serializeValue(mirror)); variable 47 JSON.stringify(serializer.serializeReferencedObjects())); 68 // Parse JSON representation of unresolved functions and check. 69 var fromJSON = eval('(' + json + ')'); 70 assertEquals('function', fromJSON.type, 'Unexpected mirror type in JSON'); 71 assertEquals('Function', fromJSON.className, 'Unexpected mirror class name in JSON'); 72 assertEquals(mirror.constructorFunction().handle(), fromJSON.constructorFunction.ref, 'Unexpected constructor function handle in JSON'); 73 assertEquals('undefined', refs.lookup(fromJSON.constructorFunction.ref).type, 'Unexpected constructor function type in JSON'); 74 assertEquals(mirror.protoObject().handle(), fromJSON.protoObject.ref, 'Unexpected proto object handle in JSON'); [all...] |
debug-backtrace.js | 51 function ParsedResponse(json) { 52 this.response_ = eval('(' + json + ')'); 101 var json; 102 json = '{"seq":0,"type":"request","command":"backtrace"}' 103 var resp = dcp.processDebugJSONRequest(json); 126 json = '{"seq":0,"type":"request","command":"backtrace","arguments":{"fromFrame":1,"toFrame":3}}' 127 response = new ParsedResponse(dcp.processDebugJSONRequest(json)); 144 json = '{"seq":0,"type":"request","command":"backtrace","arguments":{"fromFrame":0,"toFrame":2, "bottom":true}}' 145 response = new ParsedResponse(dcp.processDebugJSONRequest(json)); 161 json = '{"seq":0,"type":"request","command":"frame"} [all...] |
mirror-boolean.js | 32 // Create mirror and JSON representation. 35 var json = JSON.stringify(serializer.serializeValue(mirror)); 50 // Parse JSON representation and check. 51 var fromJSON = eval('(' + json + ')'); 52 assertEquals('boolean', fromJSON.type, json); 53 assertEquals(b, fromJSON.value, json);
|
mirror-array.js | 44 // Create mirror and JSON representation. 47 var json = JSON.stringify(serializer.serializeValue(mirror)); 49 JSON.stringify(serializer.serializeReferencedObjects())); 75 // Parse JSON representation and check. 76 var fromJSON = eval('(' + json + ')'); 77 assertEquals('object', fromJSON.type, 'Unexpected mirror type in JSON'); 78 assertEquals('Array', fromJSON.className, 'Unexpected mirror class name in JSON'); 79 assertEquals(mirror.constructorFunction().handle(), fromJSON.constructorFunction.ref, 'Unexpected constructor function handle in JSON'); 80 assertEquals('function', refs.lookup(fromJSON.constructorFunction.ref).type, 'Unexpected constructor function type in JSON'); [all...] |
mirror-null.js | 31 // Create mirror and JSON representation. 34 var json = JSON.stringify(serializer.serializeValue(mirror)); variable 48 // Parse JSON representation and check. 49 var fromJSON = eval('(' + json + ')');
|
mirror-number.js | 32 // Create mirror and JSON representation. 35 var json = JSON.stringify(serializer.serializeValue(mirror)); 50 // Parse JSON representation and check. 51 var fromJSON = eval('(' + json + ')');
|
mirror-undefined.js | 31 // Create mirror and JSON representation. 34 var json = JSON.stringify(serializer.serializeValue(mirror)); variable 48 // Parse JSON representation and check. 49 var fromJSON = eval('(' + json + ')');
|
mirror-object.js | 44 // Create mirror and JSON representation. 47 var json = JSON.stringify(serializer.serializeValue(mirror)); 49 JSON.stringify(serializer.serializeReferencedObjects())); 91 // Parse JSON representation and check. 92 var fromJSON = eval('(' + json + ')'); 93 assertEquals('object', fromJSON.type, 'Unexpected mirror type in JSON'); 94 assertEquals(cls_name, fromJSON.className, 'Unexpected mirror class name in JSON'); 95 assertEquals(mirror.constructorFunction().handle(), fromJSON.constructorFunction.ref, 'Unexpected constructor function handle in JSON'); 96 assertEquals('function', refs.lookup(fromJSON.constructorFunction.ref).type, 'Unexpected constructor function type in JSON'); [all...] |
debug-compile-event.js | 39 var json_compilations = 0; // Number of scources compiled through JSON.parse. 65 case Debug.ScriptCompilationType.JSON: 77 } else if (current_source.indexOf('JSON.parse') == 0) { 78 // For JSON the JSON source will be in parentheses. 90 var json = event_data.toJSONProtocol(); 91 var msg = eval('(' + json + ')'); 115 compileSource('JSON.parse(\'{"a":1,"b":2}\')'); 116 source_count++; // Using JSON.parse causes additional compilation event. 126 // source compiled through eval except for one JSON.parse call) [all...] |
/external/qemu/ |
json-streamer.h | 2 * JSON streaming support 18 #include "json-lexer.h"
|
json-parser.h | 2 * JSON Parser
|
/external/webkit/WebKitTools/simplejson/ |
README.txt | 7 simplejson is a JSON encoder and decoder for Python.
|
jsonfilter.py | 5 def __init__(self, app, mime_type='text/x-json'): 10 # Read JSON POST input to jsonfilter.json if matching mime type 20 environ['jsonfilter.json'] = simplejson.loads(data)
|
__init__.py | 2 A simple, fast, extensible JSON encoder and decoder 4 JSON (JavaScript Object Notation) <http://json.org> is a subset of 45 Decoding JSON:: 57 Specializing JSON object decoding:: 86 Note that the JSON produced by this module's default settings 112 Serialize ``obj`` as a JSON formatted stream to ``fp`` (a 131 in strict compliance of the JSON specification, instead of using the 134 If ``indent`` is a non-negative integer, then JSON array elements and object 140 ``(',', ':')`` is the most compact JSON representation [all...] |
/libcore/json/src/main/java/org/json/ |
JSONException.java | 17 package org.json; 19 // Note: this class was written without inspecting the non-free org.json sourcecode. 22 * Thrown to indicate a problem with the JSON API. Such problems include: 26 * <li>Use of numeric types not available to JSON, such as {@link
|
/external/webkit/LayoutTests/fast/js/resources/ |
json2-es5-compat.js | 2 http://www.JSON.org/json2.js 9 See http://www.JSON.org/js.html 11 This file creates a global JSON object containing two methods: stringify 14 JSON.stringify(value, replacer, space) 28 This method produces a JSON text from a JavaScript value. 65 Values that do not have JSON representations, such as undefined or 68 a replacer function to replace those with JSON values. 69 JSON.stringify(undefined) returns undefined. 81 text = JSON.stringify(['e', {pluribus: 'unum'}]); 85 text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t') [all...] |
JSON-parse.js | 313 return jsonObject.parse(JSON.stringify(simpleObject)); 315 result[result.length - 1].expected = JSON.stringify(simpleObject); 317 return jsonObject.parse(JSON.stringify(complexObject)); 320 return jsonObject.parse(JSON.stringify(complexObject)); 322 result[result.length - 1].expected = JSON.stringify(complexObject); 324 return jsonObject.parse(JSON.stringify(simpleObject,null,100)); 326 result[result.length - 1].expected = JSON.stringify(simpleObject); 328 return jsonObject.parse(JSON.stringify(complexObject,null,100)); 331 return jsonObject.parse(JSON.stringify(complexObject,null,100)); 333 result[result.length - 1].expected = JSON.stringify(complexObject) [all...] |
/external/webkit/SunSpider/hosted/ |
json2.js | 2 http://www.JSON.org/json2.js 9 See http://www.JSON.org/js.html 19 This file creates a global JSON object containing two methods: stringify 22 JSON.stringify(value, replacer, space) 36 This method produces a JSON text from a JavaScript value. 73 Values that do not have JSON representations, such as undefined or 76 a replacer function to replace those with JSON values. 77 JSON.stringify(undefined) returns undefined. 89 text = JSON.stringify(['e', {pluribus: 'unum'}]); 93 text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t') [all...] |
/external/webkit/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/ |
json_results_generator.py | 45 # Min time (seconds) that will be added to the JSON. 77 RESULTS_FILENAME = "results.json" 82 """Modifies the results.json file. Grabs it off the archive directory 90 results json file. 115 """Generates the JSON output file.""" 116 json = self._get_json() 117 if json: 119 results_file.write(json) 142 """Reads old results JSON file if it exists. 154 # Check if we have the archived JSON file on the buildbot server [all...] |
/external/v8/src/ |
d8.js | 98 JSON: 2 }; 118 // Process a debugger JSON message into a display text and a running status. 122 // Convert the JSON string to an object. 255 // Converts a text command to a JSON request. 262 // If the very first character is a { assume that a JSON request have been 263 // entered as a command. Converting that to a JSON request is trivial. 353 // Return undefined to indicate command handled internally (no JSON). 361 // Return undefined to indicate command handled internally (no JSON). 386 var json = '{'; 387 json += '"seq":' + this.seq [all...] |