Home
last modified time | relevance | path

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

12345678910>>...46

/aosp_15_r20/external/grpc-grpc/test/core/json/
H A 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 …]
/aosp_15_r20/external/cronet/third_party/protobuf/python/google/protobuf/internal/
H A 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 …]
/aosp_15_r20/external/protobuf/python/google/protobuf/internal/
H A 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 …]
/aosp_15_r20/external/skia/infra/bots/recipes/
H A 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 …]
H A 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 …]
/aosp_15_r20/external/libchrome-gestures/src/
H A 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 …]
/aosp_15_r20/hardware/google/pixel/thermal/utils/
Dthermal_info.cpp8 * http://www.apache.org/licenses/LICENSE-2.0
18 #include <android-base/file.h>
19 #include <android-base/logging.h>
20 #include <android-base/properties.h>
21 #include <android-base/strings.h>
22 #include <json/reader.h>
50 float getFloatFromValue(const Json::Value &value) { in getFloatFromValue()
58 int getIntFromValue(const Json::Value &value) { in getIntFromValue()
67 bool getIntFromJsonValues(const Json::Value &values, CdevArray *out, bool inc_check, in getIntFromJsonValues()
81 for (Json::Value::ArrayIndex i = 0; i < kThrottlingSeverityCount; ++i) { in getIntFromJsonValues()
[all …]
/aosp_15_r20/external/protobuf/csharp/src/Google.Protobuf/
H A 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 …]
/aosp_15_r20/external/cronet/third_party/protobuf/csharp/src/Google.Protobuf/
H A 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 …]
/aosp_15_r20/external/gson/gson/src/main/java/com/google/gson/
H A 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 …]
/aosp_15_r20/external/jsoncpp/src/test_lib_json/
H A Dmain.cpp1 // Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
8 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
22 #include <json/config.h>
23 #include <json/json.h>
30 using CharReaderPtr = std::unique_ptr<Json::CharReader>;
34 #define kint32max Json::Value::maxInt
35 #define kint32min Json::Value::minInt
36 #define kuint32max Json::Value::maxUInt
37 #define kint64max Json::Value::maxInt64
38 #define kint64min Json::Value::minInt64
[all …]
/aosp_15_r20/external/bcc/src/lua/bcc/vendor/
H A 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 …]
/aosp_15_r20/external/cronet/third_party/protobuf/python/google/protobuf/
H A 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 …]
/aosp_15_r20/external/protobuf/python/google/protobuf/
H A 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 …]
/aosp_15_r20/external/openscreen/cast/receiver/
H A 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 …]
/aosp_15_r20/external/cronet/third_party/protobuf/csharp/src/Google.Protobuf.Test/
H A DJsonParserTest.cs2 // Protocol Buffers - Google's data interchange format
4 // https://developers.google.com/protocol-buffers/
45 /// Unit tests for JSON parsing.
73 var json = "{ \"mapInt32Int32\": { \"" + keyText + "\" : \"1\" } }"; in IntegerMapKeysAreStrict()
74 … Assert.Throws<InvalidProtocolBufferException>(() => JsonParser.Default.Parse<TestMap>(json)); in IntegerMapKeysAreStrict()
80 var json = "{ \"single_int32\": 10 }"; in OriginalFieldNameAccepted()
82 Assert.AreEqual(expected, TestAllTypes.Parser.ParseJson(json)); in OriginalFieldNameAccepted()
130 // When we parse the "valueField": null part, we remember it... basically, it's one case in SingularWrappers_ExplicitNulls()
133 var json = new JsonFormatter(new JsonFormatter.Settings(true)).Format(message); in SingularWrappers_ExplicitNulls()
134 var parsed = JsonParser.Default.Parse<TestWellKnownTypes>(json); in SingularWrappers_ExplicitNulls()
[all …]
/aosp_15_r20/external/protobuf/csharp/src/Google.Protobuf.Test/
H A DJsonParserTest.cs2 // Protocol Buffers - Google's data interchange format
4 // https://developers.google.com/protocol-buffers/
45 /// Unit tests for JSON parsing.
73 var json = "{ \"mapInt32Int32\": { \"" + keyText + "\" : \"1\" } }"; in IntegerMapKeysAreStrict()
74 … Assert.Throws<InvalidProtocolBufferException>(() => JsonParser.Default.Parse<TestMap>(json)); in IntegerMapKeysAreStrict()
80 var json = "{ \"single_int32\": 10 }"; in OriginalFieldNameAccepted()
82 Assert.AreEqual(expected, TestAllTypes.Parser.ParseJson(json)); in OriginalFieldNameAccepted()
130 // When we parse the "valueField": null part, we remember it... basically, it's one case in SingularWrappers_ExplicitNulls()
133 var json = new JsonFormatter(new JsonFormatter.Settings(true)).Format(message); in SingularWrappers_ExplicitNulls()
134 var parsed = JsonParser.Default.Parse<TestWellKnownTypes>(json); in SingularWrappers_ExplicitNulls()
[all …]
/aosp_15_r20/external/python/google-api-python-client/tests/
Dtest_discovery.py2 # -*- coding: utf-8 -*-
10 # http://www.apache.org/licenses/LICENSE-2.0
33 import json
99 expected = urllib.parse.urlparse(expected)
100 actual = urllib.parse.urlparse(actual)
106 expected_query = urllib.parse.parse_qs(expected.query)
107 actual_query = urllib.parse.parse_qs(actual.query)
128 actual_uri = http_mock.request_sequence[-1][0]
149 self.zoo_root_desc = json.loads(read_datafile("zoo.json", "r"))
156 self.assertEqual("max_results", key2param("max-results"))
[all …]
/aosp_15_r20/external/lottie/lottie/src/main/java/com/airbnb/lottie/
H A DLottieCompositionFactory.java28 import org.json.JSONObject;
56 * In-progress tasks will also be held so they can be returned for subsequent requests for the same
63 * Keep a map of cache keys to in-progress tasks and return them for new requests.
64 * Without this, simultaneous requests to parse a composition will trigger multiple parallel
65 * parse tasks prior to the cache getting populated.
130 return cache(cacheKey, () -> { in fromUrl()
169 …* Parse an animation from src/main/assets. It is recommended to use {@link #fromRawRes(Context, in…
170 …* The asset file name will be used as a cache key so future usages won't have to parse the json ag…
171 …* However, if your animation has images, you may package the json and images as a single flattened…
183 …* Parse an animation from src/main/assets. It is recommended to use {@link #fromRawRes(Context, in…
[all …]
/aosp_15_r20/external/cronet/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/
H A DJsonParserTest.cs2 // Protocol Buffers - Google's data interchange format
4 // https://developers.google.com/protocol-buffers/
42 /// Unit tests for JSON parsing.
70 var json = "{ \"mapInt32Int32\": { \"" + keyText + "\" : \"1\" } }"; in IntegerMapKeysAreStrict()
71 … Assert.Throws<InvalidProtocolBufferException>(() => JsonParser.Default.Parse<TestMap>(json)); in IntegerMapKeysAreStrict()
77 var json = "{ \"single_int32\": 10 }"; in OriginalFieldNameAccepted()
79 Assert.AreEqual(expected, TestAllTypes.Parser.ParseJson(json)); in OriginalFieldNameAccepted()
127 // When we parse the "valueField": null part, we remember it... basically, it's one case in SingularWrappers_ExplicitNulls()
130 var json = new JsonFormatter(new JsonFormatter.Settings(true)).Format(message); in SingularWrappers_ExplicitNulls()
131 var parsed = JsonParser.Default.Parse<TestWellKnownTypes>(json); in SingularWrappers_ExplicitNulls()
[all …]
/aosp_15_r20/external/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/
H A DJsonParserTest.cs2 // Protocol Buffers - Google's data interchange format
4 // https://developers.google.com/protocol-buffers/
42 /// Unit tests for JSON parsing.
70 var json = "{ \"mapInt32Int32\": { \"" + keyText + "\" : \"1\" } }"; in IntegerMapKeysAreStrict()
71 … Assert.Throws<InvalidProtocolBufferException>(() => JsonParser.Default.Parse<TestMap>(json)); in IntegerMapKeysAreStrict()
77 var json = "{ \"single_int32\": 10 }"; in OriginalFieldNameAccepted()
79 Assert.AreEqual(expected, TestAllTypes.Parser.ParseJson(json)); in OriginalFieldNameAccepted()
127 // When we parse the "valueField": null part, we remember it... basically, it's one case in SingularWrappers_ExplicitNulls()
130 var json = new JsonFormatter(new JsonFormatter.Settings(true)).Format(message); in SingularWrappers_ExplicitNulls()
131 var parsed = JsonParser.Default.Parse<TestWellKnownTypes>(json); in SingularWrappers_ExplicitNulls()
[all …]
/aosp_15_r20/packages/services/Car/service/src/com/android/car/hal/fakevhal/
DFakeVhalConfigParser.java8 * http://www.apache.org/licenses/LICENSE-2.0
60 * A JSON parser class to get configs and values from JSON config files.
67 private static final int ACCESS_NOT_SET = -1;
215 * Reads custom config files and parses the JSON root object whose field name is "properties".
217 * @param customConfigFile The custom config JSON file to parse from.
241 * @param configInputStream The {@link InputStream} to parse from.
244 * @throws IllegalArgumentException if file is not a valid expected JSON file.
254 try (var reader = new JsonReader(new InputStreamReader(configInputStream, "UTF-8"))) { in parseJsonConfig()
256 int parsed = parseObjectEntry(reader, (String fieldName) -> { in parseJsonConfig()
263 int propertyParsed = parseArrayEntry(reader, (int index) -> { in parseJsonConfig()
[all …]
/aosp_15_r20/development/tools/external_crates/test_mapping/src/
H A Djson.rs7 // http://www.apache.org/licenses/LICENSE-2.0
15 //! Representation of a TEST_MAPPING JSON file.
29 #[serde(default, skip_serializing_if = "Vec::is_empty", rename = "presubmit-rust")]
46 pub fn parse(mut contents: String) -> Result<TestMappingJson, TestMappingError> { in parse() method
48 …// Comments are not part of the JSON spec (although they are often used), and Serde won't parse th… in parse()
53 pub fn is_empty(&self) -> bool { in is_empty()
63 pub fn convert_postsubmit_tests(&mut self) -> bool { in convert_postsubmit_tests()
73 pub fn add_new_tests_to_postsubmit(&mut self, tests: &BTreeSet<String>) -> bool { in add_new_tests_to_postsubmit()
83 fn all_test_names(&self) -> BTreeSet<String> { in all_test_names()
107 "presubmit-rust": [
[all …]
/aosp_15_r20/prebuilts/vndk/v34/x86/include/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 …]
/aosp_15_r20/prebuilts/vndk/v33/arm/include/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 …]

12345678910>>...46