Home
last modified time | relevance | path

Searched +full:parse +full:- +full:json (Results 1 – 25 of 1056) sorted by relevance

12345678910>>...43

/external/grpc-grpc/test/core/json/
Djson_object_loader_test.cc7 // http://www.apache.org/licenses/LICENSE-2.0
15 #include "src/core/lib/json/json_object_loader.h"
23 #include <grpc/support/json.h>
27 #include "src/core/lib/json/json_reader.h"
28 #include "src/core/lib/json/json_writer.h"
34 absl::StatusOr<T> Parse(absl::string_view json, in Parse() function
36 auto parsed = JsonParse(json); in Parse()
70 auto test_struct = Parse<TestStruct>("{\"value\": 5}"); in TYPED_TEST_P()
72 EXPECT_EQ(test_struct->value, 5); in TYPED_TEST_P()
73 EXPECT_EQ(test_struct->optional_value, 0); in TYPED_TEST_P()
[all …]
/external/skia/infra/bots/recipes/
Dperf_skottiewasm_lottieweb.py2 # Use of this source code is governed by a BSD-style license that can be
5 # Recipe which runs Skottie-WASM and Lottie-Web perf.
8 import json
21 'recipe_engine/json',
32 'lottiefiles.com - Progress Success.json',
34 'lottiefiles.com - VR.json',
35 'vr_animation.json',
37 'lottiefiles.com - Nudge.json',
38 'lottiefiles.com - Retweet.json',
42 'mask1.json',
[all …]
Dperf_skottietrace.py2 # Use of this source code is governed by a BSD-style license that can be
6 # trace output into output JSON files to ingest to perf.skia.org.
7 # Design doc: go/skottie-tracing
11 import json
22 'recipe_engine/json',
38 """Run DM on lottie files with tracing turned on and then parse the output."""
48 # the symlinks and adb push --sync works as expected.
52 … # Make a temp directory and then copy to a *non-existing* subfolder (otherwise copytree crashes).
58 # We expect this to be a bunch of folders that contain a data.json and optionally
64 # Run DM on each lottie file and parse the trace files.
[all …]
/external/cronet/third_party/protobuf/python/google/protobuf/internal/
Djson_format_test.py1 # Protocol Buffers - Google's data interchange format
3 # https://developers.google.com/protocol-buffers/
35 import json
61 message.int64_value = -20
64 message.float_value = float('-inf')
73 message.repeated_int32_value.append(-2147483648)
75 message.repeated_int64_value.append(-9007199254740992)
82 message.repeated_double_value.append(1E-15)
97 json_format.Parse(json_format.MessageToJson(message),
104 json_format.Parse, text, message)
[all …]
/external/protobuf/python/google/protobuf/internal/
Djson_format_test.py1 # Protocol Buffers - Google's data interchange format
3 # https://developers.google.com/protocol-buffers/
35 import json
61 message.int64_value = -20
64 message.float_value = float('-inf')
73 message.repeated_int32_value.append(-2147483648)
75 message.repeated_int64_value.append(-9007199254740992)
82 message.repeated_double_value.append(1E-15)
97 json_format.Parse(json_format.MessageToJson(message),
104 json_format.Parse, text, message)
[all …]
/external/gson/gson/src/main/java/com/google/gson/
DJsonParser.java8 * http://www.apache.org/licenses/LICENSE-2.0
27 * A parser to parse JSON into a parse tree of {@link JsonElement}s.
39 * Parses the specified JSON string into a parse tree.
40 * An exception is thrown if the JSON string has multiple top-level JSON elements,
43 * <p>The JSON string is parsed in {@linkplain JsonReader#setLenient(boolean) lenient mode}.
45 * @param json JSON text
46 * @return a parse tree of {@link JsonElement}s corresponding to the specified JSON
47 * @throws JsonParseException if the specified text is not valid JSON
50 public static JsonElement parseString(String json) throws JsonSyntaxException { in parseString() argument
51 return parseReader(new StringReader(json)); in parseString()
[all …]
/external/libchrome-gestures/src/
Dactivity_replay.cc2 // Use of this source code is governed by a BSD-style license that can be
12 #include <json/reader.h>
13 #include <json/writer.h>
33 Visitor(V...) -> Visitor<V...>;
42 bool ActivityReplay::Parse(const string& data) { in Parse() function in gestures::ActivityReplay
44 return Parse(data, emptyset); in Parse()
47 bool ActivityReplay::Parse(const string& data, in Parse() function in gestures::ActivityReplay
53 Json::Value root; in Parse()
55 Json::CharReaderBuilder builder; in Parse()
56 std::unique_ptr<Json::CharReader> const reader(builder.newCharReader()); in Parse()
[all …]
/external/bcc/src/lua/bcc/vendor/
Djson.lua1 --[[ json.lua
3 A compact pure-Lua JSON library.
8 The main functions are: json.stringify, json.parse.
10 ## json.stringify:
14 strings in json; this is part of the json spec.
15 * They are not recursive. Such a structure cannot be specified in json.
19 so: `[2, 3, false, "hi"]`. Any other type of Lua table is encoded as a json
23 equivalent to a missing key, there is no way to express the json "null" value in
27 An empty Lua table, {}, could be considered either a json object or array -
32 Rather, it is what we get when we completely observe the json specification for
[all …]
/external/rust/crates/config/src/file/format/
Dmod.rs15 #[cfg(feature = "json")]
16 mod json; module
39 /// JSON (parsed with serde_json)
40 #[cfg(feature = "json")]
41 Json, enumerator
69 #[cfg(feature = "json")]
70 formats.insert(FileFormat::Json, vec!["json"]);
89 pub(crate) fn extensions(&self) -> &'static [&'static str] { in extensions()
96 pub(crate) fn parse( in parse() method
100 ) -> Result<Map<String, Value>, Box<dyn Error + Send + Sync>> { in parse()
[all …]
/external/pigweed/pw_build/py/
Dbazel_query_test.py7 # https://www.apache.org/licenses/LICENSE-2.0
16 import json
28 """Tests a top-level rule with no package name."""
29 rule = BazelRule('//:no-package', 'custom-type')
34 rule = BazelRule('//foo:target', 'custom-type')
40 rule = BazelRule('//foo:bar/target', 'custom-type')
46 rule = BazelRule('//foo/bar:target', 'custom-type')
52 rule = BazelRule('//foo/bar', 'custom-type')
57 """Tests a rule with an invalid (non-absolute) package name."""
59 BazelRule('../foo/bar:target', 'custom-type')
[all …]
/external/cronet/third_party/protobuf/csharp/src/Google.Protobuf/
DJsonParser.cs2 // Protocol Buffers - Google's data interchange format
4 // https://developers.google.com/protocol-buffers/
47 /// Reflection-based converter from JSON to messages.
51 /// Instances of this class are thread-safe, with no mutable state.
54 /// This is a simple start to get JSON parsing working. As it's reflection-based,
55 /// it's not as quick as baking calls into generated messages - but is a simpler implementation.
61 // Note: using 0-9 instead of \d to ensure no non-ASCII digits.
63 …(?<datetime>[0-9]{4}-[01][0-9]-[0-3][0-9]T[012][0-9]:[0-5][0-9]:[0-5][0-9])(?<subseconds>\.[0-9]{1…
64 …tic readonly Regex DurationRegex = new Regex(@"^(?<sign>-)?(?<int>[0-9]{1,12})(?<subseconds>\.[0-9…
71 …// TODO: Consider introducing a class containing parse state of the parser, tokenizer and depth. T…
[all …]
DMessageParser.cs2 // Protocol Buffers - Google's data interchange format
4 // https://developers.google.com/protocol-buffers/
41 /// A general message parser, typically used by reflection-based code as all the methods
84 /// <param name="offset">The offset of the slice to parse.</param>
85 /// <param name="length">The length of the slice to parse.</param>
97 /// <param name="data">The data to parse.</param>
109 /// <param name="input">The stream to parse.</param>
121 /// <param name="data">The data to parse.</param>
134 /// <param name="data">The data to parse.</param>
145 /// Parses a length-delimited message from the given stream.
[all …]
/external/protobuf/csharp/src/Google.Protobuf/
DJsonParser.cs2 // Protocol Buffers - Google's data interchange format
4 // https://developers.google.com/protocol-buffers/
47 /// Reflection-based converter from JSON to messages.
51 /// Instances of this class are thread-safe, with no mutable state.
54 /// This is a simple start to get JSON parsing working. As it's reflection-based,
55 /// it's not as quick as baking calls into generated messages - but is a simpler implementation.
61 // Note: using 0-9 instead of \d to ensure no non-ASCII digits.
63 …(?<datetime>[0-9]{4}-[01][0-9]-[0-3][0-9]T[012][0-9]:[0-5][0-9]:[0-5][0-9])(?<subseconds>\.[0-9]{1…
64 …tic readonly Regex DurationRegex = new Regex(@"^(?<sign>-)?(?<int>[0-9]{1,12})(?<subseconds>\.[0-9…
71 …// TODO: Consider introducing a class containing parse state of the parser, tokenizer and depth. T…
[all …]
DMessageParser.cs2 // Protocol Buffers - Google's data interchange format
4 // https://developers.google.com/protocol-buffers/
41 /// A general message parser, typically used by reflection-based code as all the methods
84 /// <param name="offset">The offset of the slice to parse.</param>
85 /// <param name="length">The length of the slice to parse.</param>
97 /// <param name="data">The data to parse.</param>
109 /// <param name="input">The stream to parse.</param>
121 /// <param name="data">The data to parse.</param>
134 /// <param name="data">The data to parse.</param>
145 /// Parses a length-delimited message from the given stream.
[all …]
/external/cronet/third_party/protobuf/src/google/protobuf/util/internal/
Djson_stream_parser.h1 // Protocol Buffers - Google's data interchange format
3 // https://developers.google.com/protocol-buffers/
54 // A JSON parser that can parse a stream of JSON chunks rather than needing the
55 // entire JSON string up front. It is a modified version of the parser in
56 // //net/proto/json/json-parser.h that has been changed in the following ways:
57 // - Changed from recursion to an explicit stack to allow resumption
58 // - Added support for int64 and uint64 numbers
59 // - Removed support for octal and decimal escapes
60 // - Removed support for numeric keys
61 // - Removed support for functions (javascript)
[all …]
/external/protobuf/src/google/protobuf/util/internal/
Djson_stream_parser.h1 // Protocol Buffers - Google's data interchange format
3 // https://developers.google.com/protocol-buffers/
54 // A JSON parser that can parse a stream of JSON chunks rather than needing the
55 // entire JSON string up front. It is a modified version of the parser in
56 // //net/proto/json/json-parser.h that has been changed in the following ways:
57 // - Changed from recursion to an explicit stack to allow resumption
58 // - Added support for int64 and uint64 numbers
59 // - Removed support for octal and decimal escapes
60 // - Removed support for numeric keys
61 // - Removed support for functions (javascript)
[all …]
/external/jsoncpp/include/json/
Dreader.h1 // Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
19 // Disable warning C4251: <data member>: <type> needs to have dll-interface to
28 namespace Json {
30 /** \brief Unserialize a <a HREF="http://www.json.org">JSON</a> document into a
41 /** \brief An error tagged with where in the JSON text it was encountered.
62 /** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a>
65 * \param document UTF-8 encoded string containing the document
76 bool parse(const std::string& document, Value& root,
79 /** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a>
82 * \param beginDoc Pointer on the beginning of the UTF-8 encoded
[all …]
/external/openscreen/cast/receiver/
Dapplication_agent_unittest.cc2 // Use of this source code is governed by a BSD-style license that can be
20 #include "json/writer.h" // Included to teach gtest how to pretty-print.
25 #include "util/json/json_serialization.h"
89 MOCK_METHOD(void, DidLaunch, (Json::Value params, MessagePort* port), ());
106 const Json::Value& app_params, in Launch()
120 oss << GetAppIds().front() << "-9ABC-DEF0-1234-"; in GetSessionId()
172 // namespace, confirms there is JSON in the payload, and returns parsed JSON
173 // (or an empty object if the parse fails).
174 static Json::Value ValidateAndParseMessage(const CastMessage& message, in ValidateAndParseMessage()
184 ErrorOr<Json::Value> parsed = json::Parse(message.payload_utf8()); in ValidateAndParseMessage()
[all …]
/external/protobuf/python/google/protobuf/
Djson_format.py1 # Protocol Buffers - Google's data interchange format
3 # https://developers.google.com/protocol-buffers/
31 """Contains routines for printing protocol messages in JSON format.
35 # Create a proto object and serialize it to a json format string.
39 # Parse a json format string to proto object.
40 message = json_format.Parse(json_string, my_proto_pb2.MyMessage())
48 import json
59 _TIMESTAMPFOMAT = '%Y-%m-%dT%H:%M:%S'
69 _NEG_INFINITY = '-Infinity'
73 u'[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]')
[all …]
/external/cronet/third_party/protobuf/python/google/protobuf/
Djson_format.py1 # Protocol Buffers - Google's data interchange format
3 # https://developers.google.com/protocol-buffers/
31 """Contains routines for printing protocol messages in JSON format.
35 # Create a proto object and serialize it to a json format string.
39 # Parse a json format string to proto object.
40 message = json_format.Parse(json_string, my_proto_pb2.MyMessage())
48 import json
59 _TIMESTAMPFOMAT = '%Y-%m-%dT%H:%M:%S'
69 _NEG_INFINITY = '-Infinity'
73 u'[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]')
[all …]
/external/grpc-grpc/src/core/ext/xds/
Dxds_http_fault_filter.cc8 // http://www.apache.org/licenses/LICENSE-2.0
37 #include <grpc/support/json.h>
47 #include "src/core/lib/json/json.h"
48 #include "src/core/lib/json/json_writer.h"
95 errors->AddError("could not parse fault injection filter config"); in GenerateFilterConfig()
99 serialized_filter_config->data(), serialized_filter_config->size(), in GenerateFilterConfig()
102 errors->AddError("could not parse fault injection filter config"); in GenerateFilterConfig()
106 // JSON form of the filter config as part of method config, which will be in GenerateFilterConfig()
113 Json::Object fault_injection_policy_json; in GenerateFilterConfig()
114 // Section 1: Parse the abort injection config in GenerateFilterConfig()
[all …]
/external/rust/crates/grpcio-sys/grpc/src/core/ext/xds/
Dxds_http_fault_filter.cc8 // http://www.apache.org/licenses/LICENSE-2.0
37 #include <grpc/support/json.h>
47 #include "src/core/lib/json/json.h"
48 #include "src/core/lib/json/json_writer.h"
95 errors->AddError("could not parse fault injection filter config"); in GenerateFilterConfig()
99 serialized_filter_config->data(), serialized_filter_config->size(), in GenerateFilterConfig()
102 errors->AddError("could not parse fault injection filter config"); in GenerateFilterConfig()
106 // JSON form of the filter config as part of method config, which will be in GenerateFilterConfig()
113 Json::Object fault_injection_policy_json; in GenerateFilterConfig()
114 // Section 1: Parse the abort injection config in GenerateFilterConfig()
[all …]
/external/openscreen/cast/streaming/
Dreceiver_message.cc2 // Use of this source code is governed by a BSD-style license that can be
12 #include "json/reader.h"
13 #include "json/writer.h"
17 #include "util/json/json_helpers.h"
18 #include "util/json/json_serialization.h"
42 ReceiverMessage::Type GetMessageType(const Json::Value& root) { in GetMessageType()
44 if (!json::TryParseString(root[kMessageType], &type)) { in GetMessageType()
54 bool TryParseCapability(const Json::Value& value, MediaCapability* out) { in TryParseCapability()
56 if (!json::TryParseString(value, &c)) { in TryParseCapability()
72 ErrorOr<ReceiverError> ReceiverError::Parse(const Json::Value& value) { in Parse() function in openscreen::cast::ReceiverError
[all …]
/external/kotlinx.serialization/formats/json-tests/commonTest/src/kotlinx/serialization/json/
DJsonParserTest.kt2 …* Copyright 2017-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 licen…
5 package kotlinx.serialization.json
9 import kotlinx.serialization.json.internal.*
17 val tree = parse("""{"x": "{"}""") in testQuotedBrace()
22 private fun parse(input: String) = default.parseToJsonElement(input).jsonObject in parse() method in kotlinx.serialization.json.JsonParserTest
26 val tree = parse("""{"":"","":""}""") in parse()
34 parse("""{"X": "foo", "Y"}""") in testEmptyValue()
41 parse("""{"X": "\uDD1H"}""") in testIncorrectUnicodeEscape()
86 …essage("JsonDecodingException", "Trailing comma before the end of JSON object") { Json.parseToJso… in testTrailingComma()
92 parse("\"")
[all …]
/external/perfetto/src/trace_processor/
Dstorage_minimal_smoke_test.cc8 * http://www.apache.org/licenses/LICENSE-2.0
20 #include <json/reader.h>
21 #include <json/value.h>
33 class JsonStringOutputWriter : public json::OutputWriter {
56 util::Status status = storage_->Parse(std::move(buf), rsize); in TEST_F()
58 storage_->NotifyEndOfFile(); in TEST_F()
61 json::ExportJson(storage_.get(), &output_writer); in TEST_F()
62 Json::CharReaderBuilder b; in TEST_F()
63 auto reader = std::unique_ptr<Json::CharReader>(b.newCharReader()); in TEST_F()
65 Json::Value result; in TEST_F()
[all …]

12345678910>>...43