Home
last modified time | relevance | path

Searched full:json (Results 1 – 25 of 6522) sorted by relevance

12345678910>>...261

/third_party/json/tests/src/
Dunit-testsuites.cpp2 // __| | __| | | | JSON for Modern C++ (supporting code)
4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json
11 #include <nlohmann/json.hpp>
12 using nlohmann::json;
17 TEST_CASE("compliance tests from json.org")
19 // test cases are from https://json.org/JSON_checker/
25 //TEST_DATA_DIRECTORY "/json_tests/fail1.json",
26 TEST_DATA_DIRECTORY "/json_tests/fail2.json",
27 TEST_DATA_DIRECTORY "/json_tests/fail3.json",
28 TEST_DATA_DIRECTORY "/json_tests/fail4.json",
[all …]
Dunit-conversions.cpp2 // __| | __| | | | JSON for Modern C++ (supporting code)
4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json
20 #include <nlohmann/json.hpp>
21 using nlohmann::json;
39 const json::object_t o_reference = {{"object", json::object()},
46 json j(o_reference);
48 SECTION("json::object_t")
50 json::object_t const o = j.get<json::object_t>();
51 CHECK(json(o) == j);
54 SECTION("std::map<json::string_t, json>")
[all …]
Dunit-element_access1.cpp2 // __| | __| | | | JSON for Modern C++ (supporting code)
4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json
12 #include <nlohmann/json.hpp>
13 using nlohmann::json;
19 json j = {1, 1u, true, nullptr, "string", 42.23, json::object(), {1, 2, 3}};
20 const json j_const = j;
26 CHECK(j.at(0) == json(1));
27 CHECK(j.at(1) == json(1u));
28 CHECK(j.at(2) == json(true));
29 CHECK(j.at(3) == json(nullptr));
[all …]
Dunit-constructor1.cpp2 // __| | __| | | | JSON for Modern C++ (supporting code)
4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json
12 #include <nlohmann/json.hpp>
13 using nlohmann::json;
30 auto const t = json::value_t::null;
31 json const j(t);
37 auto const t = json::value_t::discarded;
38 json const j(t);
44 auto const t = json::value_t::object;
45 json const j(t);
[all …]
Dunit-modifiers.cpp2 // __| | __| | | | JSON for Modern C++ (supporting code)
4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json
12 #include <nlohmann/json.hpp>
13 using nlohmann::json;
21 json j = true;
22 json const k = j;
25 CHECK(j == json(json::value_t::boolean));
26 CHECK(j == json(k.type()));
31 json j = "hello world";
32 json const k = j;
[all …]
Dunit-iterators2.cpp2 // __| | __| | | | JSON for Modern C++ (supporting code)
4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json
18 #include <nlohmann/json.hpp>
19 using nlohmann::json;
30json j_values = {nullptr, true, 42, 42u, 23.23, {{"one", 1}, {"two", 2}}, {1, 2, 3, 4, 5}, "Hello,…
32 for (json& j : j_values)
74 if (j.type() == json::value_t::object)
77 …ECK_THROWS_WITH_AS(it1 < it1, "[json.exception.invalid_iterator.213] (/5) cannot compare order of …
78 …ECK_THROWS_WITH_AS(it1 < it2, "[json.exception.invalid_iterator.213] (/5) cannot compare order of …
79 …ECK_THROWS_WITH_AS(it2 < it3, "[json.exception.invalid_iterator.213] (/5) cannot compare order of …
[all …]
Dunit-reference_access.cpp2 // __| | __| | | | JSON for Modern C++ (supporting code)
4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json
11 #include <nlohmann/json.hpp>
12 using nlohmann::json;
16 // create a JSON value with different types
17 const json json_types =
33 using test_type = json::object_t;
34 json value = {{"one", 1}, {"two", 2}};
46 CHECK_NOTHROW(value.get_ref<json::object_t&>());
47 CHECK_THROWS_WITH_AS(value.get_ref<json::array_t&>(),
[all …]
Dunit-diagnostics.cpp2 // __| | __| | | | JSON for Modern C++ (supporting code)
4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json
18 #include <nlohmann/json.hpp>
19 using nlohmann::json;
23 SECTION("empty JSON Pointer")
25 json const j = 1;
27 …OWS_WITH_AS(s = j.get<std::string>(), "[json.exception.type_error.302] type must be string, but is…
32 json j;
35 …a"]["b"]["c"].get<std::string>(), "[json.exception.type_error.302] (/a/b/c) type must be string, b…
40 json j;
[all …]
Dunit-json_patch.cpp2 // __| | __| | | | JSON for Modern C++ (supporting code)
4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json
11 #include <nlohmann/json.hpp>
12 using nlohmann::json;
20 TEST_CASE("JSON patch")
26 // the ordering of members in JSON objects is not significant:
27 json op1 = R"({ "op": "add", "path": "/a/b/c", "value": "foo" })"_json;
28 json op2 = R"({ "path": "/a/b/c", "op": "add", "value": "foo" })"_json;
29 json op3 = R"({ "value": "foo", "path": "/a/b/c", "op": "add" })"_json;
38json const patch1 = R"([{ "op": "add", "path": "/a/b", "value": [ "foo", "bar" ] }])"_json;
[all …]
Dunit-cbor.cpp2 // __| | __| | | | JSON for Modern C++ (supporting code)
4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json
11 #include <nlohmann/json.hpp>
12 using nlohmann::json;
41 bool number_integer(json::number_integer_t /*unused*/) in number_integer()
46 bool number_unsigned(json::number_unsigned_t /*unused*/) in number_unsigned()
51 bool number_float(json::number_float_t /*unused*/, const std::string& /*unused*/) in number_float()
91 …bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, const json::exception& /*u… in parse_error()
108 json const j = json::value_t::discarded;
109 const auto result = json::to_cbor(j);
[all …]
Dunit-element_access2.cpp2 // __| | __| | | | JSON for Modern C++ (supporting code)
4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json
12 #include <nlohmann/json.hpp>
20 TEST_CASE_TEMPLATE("element access 2", Json, nlohmann::json, nlohmann::ordered_json)
24Json j = {{"integer", 1}, {"unsigned", 1u}, {"floating", 42.23}, {"null", nullptr}, {"string", "he…
25 const Json j_const = j;
31 CHECK(j.at("integer") == Json(1));
32 CHECK(j.at("unsigned") == Json(1u));
33 CHECK(j.at("boolean") == Json(true));
34 CHECK(j.at("null") == Json(nullptr));
[all …]
Dunit-msgpack.cpp2 // __| | __| | | | JSON for Modern C++ (supporting code)
4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json
11 #include <nlohmann/json.hpp>
12 using nlohmann::json;
43 bool number_integer(json::number_integer_t /*unused*/) in number_integer()
48 bool number_unsigned(json::number_unsigned_t /*unused*/) in number_unsigned()
53 bool number_float(json::number_float_t /*unused*/, const std::string& /*unused*/) in number_float()
93 …bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, const json::exception& /*u… in parse_error()
110 json const j = json::value_t::discarded;
111 const auto result = json::to_msgpack(j);
[all …]
Dunit-ubjson.cpp2 // __| | __| | | | JSON for Modern C++ (supporting code)
4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json
11 #include <nlohmann/json.hpp>
12 using nlohmann::json;
38 bool number_integer(json::number_integer_t /*unused*/) in number_integer()
43 bool number_unsigned(json::number_unsigned_t /*unused*/) in number_unsigned()
48 bool number_float(json::number_float_t /*unused*/, const std::string& /*unused*/) in number_float()
88 …bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, const json::exception& /*u… in parse_error()
105 json const j = json::value_t::discarded;
106 const auto result = json::to_ubjson(j);
[all …]
/third_party/grpc/include/grpc/support/
Djson.h34 // A JSON value, which can be any one of null, boolean, number, string,
36 class Json {
38 // The JSON type.
49 using Object = std::map<std::string, Json>;
50 using Array = std::vector<Json>;
53 static Json FromBool(bool b) { in FromBool()
54 Json json; in FromBool() local
55 json.value_ = b; in FromBool()
56 return json; in FromBool()
60 static Json FromNumber(const std::string& str) { in FromNumber()
[all …]
/third_party/skia/third_party/externals/angle2/src/libANGLE/capture/
Dframe_capture_utils.cpp111 GroupScope(JsonSerializer *json, const std::string &name) : mJson(json) in GroupScope() argument
116 GroupScope(JsonSerializer *json, const std::string &name, int index) : mJson(json) in GroupScope() argument
124 GroupScope(JsonSerializer *json, int index) : GroupScope(json, "", index) {} in GroupScope() argument
132 void SerializeColorF(JsonSerializer *json, const ColorF &color) in SerializeColorF() argument
134 json->addScalar("red", color.red); in SerializeColorF()
135 json->addScalar("green", color.green); in SerializeColorF()
136 json->addScalar("blue", color.blue); in SerializeColorF()
137 json->addScalar("alpha", color.alpha); in SerializeColorF()
140 void SerializeColorFWithGroup(JsonSerializer *json, const char *groupName, const ColorF &color) in SerializeColorFWithGroup() argument
142 GroupScope group(json, groupName); in SerializeColorFWithGroup()
[all …]
/third_party/typescript/tests/baselines/reference/
DreactJsxReactResolvedNodeNext.trace.json2 "File 'tests/cases/compiler/package.json' does not exist.",
3 "File 'tests/cases/package.json' does not exist.",
4 "File 'tests/package.json' does not exist.",
5 "File 'package.json' does not exist.",
6 "File '/package.json' does not exist.",
10 "File 'tests/cases/compiler/package.json' does not exist according to earlier cached lookups.",
11 "File 'tests/cases/package.json' does not exist according to earlier cached lookups.",
12 "File 'tests/package.json' does not exist according to earlier cached lookups.",
13 "File 'package.json' does not exist according to earlier cached lookups.",
14 "File '/package.json' does not exist according to earlier cached lookups.",
[all …]
DreactJsxReactResolvedNodeNextEsm.trace.json2 "Found 'package.json' at 'tests/cases/compiler/package.json'.",
3 "'package.json' does not have a 'typesVersions' field.",
7 "File 'tests/cases/compiler/package.json' exists according to earlier cached lookups.",
9 "Found 'package.json' at 'tests/cases/compiler/node_modules/@types/react/package.json'.",
10 "'package.json' does not have a 'typesVersions' field.",
16 …"File 'tests/cases/compiler/node_modules/@types/react/package.json' exists according to earlier ca…
21 …"File 'tests/cases/compiler/node_modules/@types/react/package.json' exists according to earlier ca…
22 "'package.json' does not have a 'typings' field.",
23 …"'package.json' has 'types' field 'index.d.ts' that references 'tests/cases/compiler/node_modules/…
26 …"File 'tests/cases/compiler/node_modules/@types/react/package.json' exists according to earlier ca…
[all …]
/third_party/json/
DChangeLog.md4 ## [3.11.2](https://github.com/nlohmann/json/releases/tag/3.11.2) (2022-08-12)
6 [Full Changelog](https://github.com/nlohmann/json/compare/v3.11.1...3.11.2)
8 …k after introduction of inline ABI namespace [\#3696](https://github.com/nlohmann/json/issues/3696)
9 … gives compilation errors in some situations [\#3682](https://github.com/nlohmann/json/issues/3682)
10 - extern from/to\_json result in linker error [\#3657](https://github.com/nlohmann/json/issues/3657)
11 - json\_fwd.hpp no longer standalone [\#3656](https://github.com/nlohmann/json/issues/3656)
12 - regression: `.value<size_t>` is compilation error. [\#3655](https://github.com/nlohmann/json/issu…
13 …o match for 'operator!=' comparing json\_pointer and const char \*/string\_t [\#3654](https://gith…
14 …call to member function 'value' is ambiguous [\#3652](https://github.com/nlohmann/json/issues/3652)
15 - macOS 10.15 Actions runner image deprecation [\#3612](https://github.com/nlohmann/json/issues/361…
[all …]
/third_party/grpc/test/core/util/json/
Djson_test.cc17 #include "src/core/util/json/json.h"
32 #include "src/core/util/json/json_reader.h"
33 #include "src/core/util/json/json_writer.h"
38 void ValidateValue(const Json& actual, const Json& expected);
40 void ValidateObject(const Json::Object& actual, const Json::Object& expected) { in ValidateObject()
50 void ValidateArray(const Json::Array& actual, const Json::Array& expected) { in ValidateArray()
57 void ValidateValue(const Json& actual, const Json& expected) { in ValidateValue()
60 case Json::Type::kNull: in ValidateValue()
62 case Json::Type::kBoolean: in ValidateValue()
65 case Json::Type::kString: in ValidateValue()
[all …]
/third_party/json/docs/mkdocs/docs/home/
Dexceptions.md7 All exceptions inherit from class `json::exception` (which in turn inherits from `std::exception`).…
10 std::exception <|-- json::exception
11 json::exception <|-- json::parse_error
12 json::exception <|-- json::invalid_iterator
13 json::exception <|-- json::type_error
14 json::exception <|-- json::out_of_range
15 json::exception <|-- json::other_error
19 class json::exception {
24 class json::parse_error {
50 #include <nlohmann/json.hpp>
[all …]
/third_party/skia/m133/infra/bots/recipes/perf_skottiewasm_lottieweb.expected/
Dlottie_web_perf_trybot.json7 "--json-output",
8 "/path/to/tmp/json",
16 "@@@STEP_LOG_LINE@listdir@[START_DIR]/lottie-samples/lottie1.json@@@",
17 "@@@STEP_LOG_LINE@listdir@[START_DIR]/lottie-samples/lottie2.json@@@",
18 "@@@STEP_LOG_LINE@listdir@[START_DIR]/lottie-samples/lottie3.json@@@",
42 "[START_DIR]/lottie-samples/lottie1.json",
44 "[CLEANUP]/g3_try_tmp_1/lottie1.json"
59 "[CLEANUP]/g3_try_tmp_1/lottie1.json",
60 "/path/to/tmp/json",
67 "name": "parse lottie1.json trace",
[all …]
Dskottie_wasm_perf_trybot.json7 "--json-output",
8 "/path/to/tmp/json",
16 "@@@STEP_LOG_LINE@listdir@[START_DIR]/lottie-samples/lottie1.json@@@",
17 "@@@STEP_LOG_LINE@listdir@[START_DIR]/lottie-samples/lottie2.json@@@",
18 "@@@STEP_LOG_LINE@listdir@[START_DIR]/lottie-samples/lottie3.json@@@",
44 "[START_DIR]/lottie-samples/lottie1.json",
46 "[CLEANUP]/g3_try_tmp_1/lottie1.json"
61 "[CLEANUP]/g3_try_tmp_1/lottie1.json",
62 "/path/to/tmp/json",
69 "name": "parse lottie1.json trace",
[all …]
Dlottie_web_canvas_perf_trybot.json7 "--json-output",
8 "/path/to/tmp/json",
16 "@@@STEP_LOG_LINE@listdir@[START_DIR]/lottie-samples/lottie1.json@@@",
17 "@@@STEP_LOG_LINE@listdir@[START_DIR]/lottie-samples/lottie2.json@@@",
18 "@@@STEP_LOG_LINE@listdir@[START_DIR]/lottie-samples/lottie3.json@@@",
42 "[START_DIR]/lottie-samples/lottie1.json",
44 "[CLEANUP]/g3_try_tmp_1/lottie1.json"
59 "[CLEANUP]/g3_try_tmp_1/lottie1.json",
60 "/path/to/tmp/json",
67 "name": "parse lottie1.json trace",
[all …]
/third_party/skia/m133/bench/
DDecodeBench.cpp106 "skottie/skottie-text-scale-to-fit-minmax.json"));
108 "skottie/skottie-sphere-effect.json"));
110 "skottie/skottie_sample_multiframe.json"));
112 DEF_BENCH(return new SkottieDecodeBench("skottie_phonehub_connecting.json", // 216x216
113 "skottie/skottie-phonehub-connecting.json"));
114 DEF_BENCH(return new SkottieDecodeBench("skottie_phonehub_generic_error.json", // 216x217
115 "skottie/skottie-phonehub-generic-error.json"));
116 DEF_BENCH(return new SkottieDecodeBench("skottie_phonehub_onboard.json", // 217x217
117 "skottie/skottie-phonehub-onboard.json"));
120 DEF_BENCH(return new SkottieDecodeBench("skottie_phonehub_svgo_connecting.json",
[all …]
/third_party/skia/bench/
DDecodeBench.cpp98 "skottie/skottie-text-scale-to-fit-minmax.json"));
100 "skottie/skottie-sphere-effect.json"));
102 "skottie/skottie_sample_multiframe.json"));
104 DEF_BENCH(return new SkottieDecodeBench("skottie_phonehub_connecting.json", // 216x216
105 "skottie/skottie-phonehub-connecting.json"));
106 DEF_BENCH(return new SkottieDecodeBench("skottie_phonehub_generic_error.json", // 216x217
107 "skottie/skottie-phonehub-generic-error.json"));
108 DEF_BENCH(return new SkottieDecodeBench("skottie_phonehub_onboard.json", // 217x217
109 "skottie/skottie-phonehub-onboard.json"));
112 DEF_BENCH(return new SkottieDecodeBench("skottie_phonehub_svgo_connecting.json",
[all …]

12345678910>>...261