HomeSort by relevance Sort by last modified time
    Searched refs:json (Results 1 - 25 of 77) sorted by null

1 2 3 4

  /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
JSON.java 17 package org.json;
19 class JSON {
21 * Returns the input if it is a JSON-permissable value; throws otherwise.
JSONTokener.java 17 package org.json;
19 // Note: this class was written without inspecting the non-free org.json sourcecode.
22 * Parses a JSON (<a href="http://www.ietf.org/rfc/rfc4627.txt">RFC 4627</a>)
26 * String json = "{"
31 * JSONObject object = (JSONObject) new JSONTokener(json).nextValue();
35 * <p>For best interoperability and performance use JSON that complies with
38 * input string was valid JSON. All of the following syntax errors will be
55 * <p>Each tokener may be used to parse a single JSON string. Instances of this
64 /** The input JSON. */
74 * @param in JSON encoded string. Null is not permitted and will yield
    [all...]
JSONArray.java 17 package org.json;
23 // Note: this class was written without inspecting the non-free org.json sourcecode.
91 throw JSON.typeMismatch(object, "JSONArray");
96 * Creates a new {@code JSONArray} with values from the JSON string.
98 * @param json a JSON-encoded string containing an array.
102 public JSONArray(String json) throws JSONException {
103 this(new JSONTokener(json));
131 values.add(JSON.checkDouble(value));
230 JSON.checkDouble(((Number) value).doubleValue())
    [all...]
  /cts/libs/json/src/com/android/json/stream/
JsonScope.java 17 package com.android.json.stream;
20 * Lexical scoping elements within a JSON reader or writer.
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/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...]
json_reader.cc 5 #include "base/json/json_reader.h"
91 "Unsupported encoding. JSON must be UTF-8.";
96 Value* JSONReader::Read(const std::string& json,
98 return ReadAndReturnError(json, allow_trailing_comma, NULL);
102 Value* JSONReader::ReadAndReturnError(const std::string& json,
106 Value* root = reader.JsonToValue(json, true, allow_trailing_comma);
127 Value* JSONReader::JsonToValue(const std::string& json, bool check_root,
130 if (!IsStringUTF8(json.c_str())) {
137 std::wstring json_wide(UTF8ToWide(json));
140 // When the input JSON string starts with a UTF-8 Byte-Order-Mar
    [all...]
  /packages/experimental/procstatlog/
procstatreport.py 19 import json namespace
201 "id_js": json.write("total_cpu"),
203 "filename_js": json.write(files_url + "/total_cpu.csv"),
204 "options_js": json.write({
243 "id_js": json.write("cpu_speed"),
245 "filename_js": json.write(files_url + "/cpu_speed.csv"),
246 "options_js": json.write({
275 "id_js": json.write("context_switches"),
277 "filename_js": json.write(files_url + "/context_switches.csv"),
278 "options_js": json.write(
    [all...]
  /external/v8/test/mjsunit/
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);
debug-mirror-cache.js 61 var json;
62 json = '{"seq":0,"type":"request","command":"backtrace"}'
63 dcp.processDebugJSONRequest(json);
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-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 + ')');
  /external/v8/tools/visual_studio/
js2c.cmd 6 %PYTHON% ..\js2c.py %TARGET_DIR%\natives.cc %TARGET_DIR%\natives-empty.cc CORE %SOURCE_DIR%\macros.py %SOURCE_DIR%\runtime.js %SOURCE_DIR%\v8natives.js %SOURCE_DIR%\array.js %SOURCE_DIR%\string.js %SOURCE_DIR%\uri.js %SOURCE_DIR%\math.js %SOURCE_DIR%\messages.js %SOURCE_DIR%\apinatives.js %SOURCE_DIR%\debug-delay.js %SOURCE_DIR%\mirror-delay.js %SOURCE_DIR%\date-delay.js %SOURCE_DIR%\regexp-delay.js %SOURCE_DIR%\json-delay.js
  /libcore/json/src/test/java/org/json/
ParsingTest.java 17 package org.json;
232 private void assertParsed(String message, Object expected, String json) throws JSONException {
233 Object actual = new JSONTokener(json).nextValue();
236 assertEquals("For input \"" + json + "\" " + message, expected, actual);
239 private void assertParsed(Object expected, String json) throws JSONException {
240 assertParsed("", expected, json);
  /external/v8/test/mjsunit/regress/
regress-1081309.js 37 function ParsedResponse(json) {
38 this.response_ = eval('(' + json + ')');
75 var json;
76 json = '{"seq":0,"type":"request","command":"backtrace"}'
77 var response = new ParsedResponse(dcp.processDebugJSONRequest(json));
  /development/samples/Wiktionary/src/com/example/android/wiktionary/
ExtendedWikiHelper.java 19 import org.json.JSONArray;
20 import org.json.JSONException;
21 import org.json.JSONObject;
93 "http://en.wiktionary.org/w/api.php?action=query&list=random&format=json";
207 // Drill into the JSON response to find the returned word
SimpleWikiHelper.java 25 import org.json.JSONArray;
26 import org.json.JSONException;
27 import org.json.JSONObject;
56 "rvprop=content&format=json%s";
147 // Drill into the JSON response to find the content body
  /development/samples/WiktionarySimple/src/com/example/android/simplewiktionary/
SimpleWikiHelper.java 25 import org.json.JSONArray;
26 import org.json.JSONException;
27 import org.json.JSONObject;
63 "rvprop=content&format=json%s";
154 // Drill into the JSON response to find the content body
  /external/chromium/base/
base.scons 389 'json/json_reader.cc',
390 'json/json_reader.h',
391 'json/json_writer.cc',
392 'json/json_writer.h',
393 'json/string_escape.cc',
394 'json/string_escape.h',
  /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...]
  /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...]

Completed in 360 milliseconds

1 2 3 4