Home
last modified time | relevance | path

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

12345678910>>...241

/third_party/json/test/src/
Dunit-testsuites.cpp3 __| | __| | | | JSON for Modern C++ (test suite)
5 |_____|_____|_____|_|___| https://github.com/nlohmann/json
32 #include <nlohmann/json.hpp>
33 using nlohmann::json;
38 TEST_CASE("compliance tests from json.org")
40 // test cases are from https://json.org/JSON_checker/
46 //TEST_DATA_DIRECTORY "/json_tests/fail1.json",
47 TEST_DATA_DIRECTORY "/json_tests/fail2.json",
48 TEST_DATA_DIRECTORY "/json_tests/fail3.json",
49 TEST_DATA_DIRECTORY "/json_tests/fail4.json",
[all …]
Dunit-conversions.cpp3 __| | __| | | | JSON for Modern C++ (test suite)
5 |_____|_____|_____|_|___| https://github.com/nlohmann/json
33 #include <nlohmann/json.hpp>
34 using nlohmann::json;
60 json::object_t o_reference = {{"object", json::object()},
67 json j(o_reference);
69 SECTION("json::object_t")
71 json::object_t o = j.get<json::object_t>();
72 CHECK(json(o) == j);
75 SECTION("std::map<json::string_t, json>")
[all …]
Dunit-constructor1.cpp3 __| | __| | | | JSON for Modern C++ (test suite)
5 |_____|_____|_____|_|___| https://github.com/nlohmann/json
34 #include <nlohmann/json.hpp>
35 using nlohmann::json;
53 auto t = json::value_t::null;
54 json j(t);
60 auto t = json::value_t::discarded;
61 json j(t);
67 auto t = json::value_t::object;
68 json j(t);
[all …]
Dunit-element_access1.cpp3 __| | __| | | | JSON for Modern C++ (test suite)
5 |_____|_____|_____|_|___| https://github.com/nlohmann/json
32 #include <nlohmann/json.hpp>
33 using nlohmann::json;
39 json j = {1, 1u, true, nullptr, "string", 42.23, json::object(), {1, 2, 3}};
40 const json j_const = j;
46 CHECK(j.at(0) == json(1));
47 CHECK(j.at(1) == json(1u));
48 CHECK(j.at(2) == json(true));
49 CHECK(j.at(3) == json(nullptr));
[all …]
Dunit-element_access2.cpp3 __| | __| | | | JSON for Modern C++ (test suite)
5 |_____|_____|_____|_|___| https://github.com/nlohmann/json
32 #include <nlohmann/json.hpp>
33 using nlohmann::json;
39json j = {{"integer", 1}, {"unsigned", 1u}, {"floating", 42.23}, {"null", nullptr}, {"string", "he…
40 const json j_const = j;
46 CHECK(j.at("integer") == json(1));
47 CHECK(j.at("unsigned") == json(1u));
48 CHECK(j.at("boolean") == json(true));
49 CHECK(j.at("null") == json(nullptr));
[all …]
Dunit-reference_access.cpp3 __| | __| | | | JSON for Modern C++ (test suite)
5 |_____|_____|_____|_|___| https://github.com/nlohmann/json
33 #include <nlohmann/json.hpp>
34 using nlohmann::json;
38 // create a JSON value with different types
39 json json_types =
55 using test_type = json::object_t;
56 json value = {{"one", 1}, {"two", 2}};
68 CHECK_NOTHROW(value.get_ref<json::object_t&>());
69 CHECK_THROWS_AS(value.get_ref<json::array_t&>(), json::type_error&);
[all …]
Dunit-modifiers.cpp3 __| | __| | | | JSON for Modern C++ (test suite)
5 |_____|_____|_____|_|___| https://github.com/nlohmann/json
32 #include <nlohmann/json.hpp>
33 using nlohmann::json;
41 json j = true;
42 json k = j;
45 CHECK(j == json(json::value_t::boolean));
46 CHECK(j == json(k.type()));
51 json j = "hello world";
52 json k = j;
[all …]
Dunit-cbor.cpp3 __| | __| | | | JSON for Modern C++ (test suite)
5 |_____|_____|_____|_|___| https://github.com/nlohmann/json
33 #include <nlohmann/json.hpp>
34 using nlohmann::json;
62 bool number_integer(json::number_integer_t) in number_integer()
67 bool number_unsigned(json::number_unsigned_t) in number_unsigned()
72 bool number_float(json::number_float_t, const std::string&) in number_float()
112 bool parse_error(std::size_t, const std::string&, const json::exception&) in parse_error()
129 json j = json::value_t::discarded;
130 const auto result = json::to_cbor(j);
[all …]
Dunit-json_patch.cpp3 __| | __| | | | JSON for Modern C++ (test suite)
5 |_____|_____|_____|_|___| https://github.com/nlohmann/json
32 #include <nlohmann/json.hpp>
33 using nlohmann::json;
38 TEST_CASE("JSON patch")
44 // the ordering of members in JSON objects is not significant:
45 json op1 = R"({ "op": "add", "path": "/a/b/c", "value": "foo" })"_json;
46 json op2 = R"({ "path": "/a/b/c", "op": "add", "value": "foo" })"_json;
47 json op3 = R"({ "value": "foo", "path": "/a/b/c", "op": "add" })"_json;
56 json patch = R"([{ "op": "add", "path": "/a/b/c", "value": [ "foo", "bar" ] }])"_json;
[all …]
Dunit-msgpack.cpp3 __| | __| | | | JSON for Modern C++ (test suite)
5 |_____|_____|_____|_|___| https://github.com/nlohmann/json
32 #include <nlohmann/json.hpp>
33 using nlohmann::json;
60 bool number_integer(json::number_integer_t) in number_integer()
65 bool number_unsigned(json::number_unsigned_t) in number_unsigned()
70 bool number_float(json::number_float_t, const std::string&) in number_float()
110 bool parse_error(std::size_t, const std::string&, const json::exception&) in parse_error()
127 json j = json::value_t::discarded;
128 const auto result = json::to_msgpack(j);
[all …]
Dunit-iterators2.cpp3 __| | __| | | | JSON for Modern C++ (test suite)
5 |_____|_____|_____|_|___| https://github.com/nlohmann/json
32 #include <nlohmann/json.hpp>
33 using nlohmann::json;
39json j_values = {nullptr, true, 42, 42u, 23.23, {{"one", 1}, {"two", 2}}, {1, 2, 3, 4, 5}, "Hello,…
41 for (json& j : j_values)
83 if (j.type() == json::value_t::object)
85 CHECK_THROWS_AS(it1 < it1, json::invalid_iterator&);
86 CHECK_THROWS_AS(it1 < it2, json::invalid_iterator&);
87 CHECK_THROWS_AS(it2 < it3, json::invalid_iterator&);
[all …]
Dunit-ubjson.cpp3 __| | __| | | | JSON for Modern C++ (test suite)
5 |_____|_____|_____|_|___| https://github.com/nlohmann/json
32 #include <nlohmann/json.hpp>
33 using nlohmann::json;
59 bool number_integer(json::number_integer_t) in number_integer()
64 bool number_unsigned(json::number_unsigned_t) in number_unsigned()
69 bool number_float(json::number_float_t, const std::string&) in number_float()
109 bool parse_error(std::size_t, const std::string&, const json::exception&) in parse_error()
126 json j = json::value_t::discarded;
127 const auto result = json::to_ubjson(j);
[all …]
Dunit-json_pointer.cpp3 __| | __| | | | JSON for Modern C++ (test suite)
5 |_____|_____|_____|_|___| https://github.com/nlohmann/json
33 #include <nlohmann/json.hpp>
34 using nlohmann::json;
37 TEST_CASE("JSON pointers")
41 CHECK_THROWS_AS(json::json_pointer("foo"), json::parse_error&);
42 CHECK_THROWS_WITH(json::json_pointer("foo"),
43 …"[json.exception.parse_error.107] parse error at byte 1: JSON pointer must be empty or begin with …
45 CHECK_THROWS_AS(json::json_pointer("/~~"), json::parse_error&);
46 CHECK_THROWS_WITH(json::json_pointer("/~~"),
[all …]
Dunit-hash.cpp3 __| | __| | | | JSON for Modern C++ (test suite)
5 |_____|_____|_____|_|___| https://github.com/nlohmann/json
32 #include <nlohmann/json.hpp>
33 using json = nlohmann::json; typedef
39 // Collect hashes for different JSON values and make sure that they are distinct
46 hashes.insert(std::hash<json> {}(json(nullptr)));
49 hashes.insert(std::hash<json> {}(json(true)));
50 hashes.insert(std::hash<json> {}(json(false)));
53 hashes.insert(std::hash<json> {}(json("")));
54 hashes.insert(std::hash<json> {}(json("foo")));
[all …]
Dunit-class_parser.cpp3 __| | __| | | | JSON for Modern C++ (test suite)
5 |_____|_____|_____|_|___| https://github.com/nlohmann/json
33 #include <nlohmann/json.hpp>
34 using nlohmann::json;
56 bool number_integer(json::number_integer_t val) in number_integer()
62 bool number_unsigned(json::number_unsigned_t val) in number_unsigned()
68 bool number_float(json::number_float_t, const std::string& s) in number_float()
80 bool binary(json::binary_t& val) in binary()
139 bool parse_error(std::size_t position, const std::string&, const json::exception&) in parse_error()
150 class SaxCountdown : public nlohmann::json::json_sax_t
[all …]
Dunit-bson.cpp3 __| | __| | | | JSON for Modern C++ (test suite)
5 |_____|_____|_____|_|___| https://github.com/nlohmann/json
32 #include <nlohmann/json.hpp>
33 using nlohmann::json;
46 json j = nullptr;
47 CHECK_THROWS_AS(json::to_bson(j), json::type_error&);
48 …CHECK_THROWS_WITH(json::to_bson(j), "[json.exception.type_error.317] to serialize to BSON, top-lev…
55 json j = true;
56 CHECK_THROWS_AS(json::to_bson(j), json::type_error&);
57 …CHECK_THROWS_WITH(json::to_bson(j), "[json.exception.type_error.317] to serialize to BSON, top-lev…
[all …]
Dunit-regression1.cpp3 __| | __| | | | JSON for Modern C++ (test suite)
5 |_____|_____|_____|_|___| https://github.com/nlohmann/json
33 // for some reason including this after the json header leads to linker errors with VS 2017...
37 #include <nlohmann/json.hpp>
38 using nlohmann::json;
126 friend void to_json(json& j, const nocopy& n) in to_json()
140 json j = json::parse(s);
152 CHECK(json(NAN).dump() == "null");
153 CHECK(json(json::number_float_t(NAN)).dump() == "null");
158 CHECK(json(INFINITY).dump() == "null");
[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/grpc/test/core/json/
Djson_test.cc30 #include "src/core/lib/json/json.h"
36 void ValidateValue(const Json& actual, const Json& expected);
38 void ValidateObject(const Json::Object& actual, const Json::Object& expected) { in ValidateObject()
48 void ValidateArray(const Json::Array& actual, const Json::Array& expected) { in ValidateArray()
55 void ValidateValue(const Json& actual, const Json& expected) { in ValidateValue()
58 case Json::Type::JSON_NULL: in ValidateValue()
59 case Json::Type::JSON_TRUE: in ValidateValue()
60 case Json::Type::JSON_FALSE: in ValidateValue()
62 case Json::Type::STRING: in ValidateValue()
63 case Json::Type::NUMBER: in ValidateValue()
[all …]
/third_party/json/
DChangeLog.md4 ## [v3.9.1](https://github.com/nlohmann/json/releases/tag/v3.9.1) (2020-08-06)
6 [Full Changelog](https://github.com/nlohmann/json/compare/v3.9.0...v3.9.1)
8 - Can't parse not formatted JSON. [\#2340](https://github.com/nlohmann/json/issues/2340)
9 … array contained in array when JSON text begins with square bracket on gcc 7.5.0 [\#2339](https://…
10 …rialization difference between Mac and Linux [\#2338](https://github.com/nlohmann/json/issues/2338)
11 - Reading ordered\_json from file causes compile error [\#2331](https://github.com/nlohmann/json/is…
12 …ple consecutive lines starting with comments [\#2330](https://github.com/nlohmann/json/issues/2330)
13 …nstallation and CMake integration - Homebrew [\#2326](https://github.com/nlohmann/json/issues/2326)
14 - Chinese character initialize error [\#2325](https://github.com/nlohmann/json/issues/2325)
15 - json.update and vector\<pair\>does not work with ordered\_json [\#2315](https://github.com/nlohma…
[all …]
/third_party/json/doc/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/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 …]
/third_party/jsoncpp/src/test_lib_json/
Dmain.cpp21 #include <json/config.h>
22 #include <json/json.h>
28 typedef Json::CharReader* CharReaderPtr;
32 #define kint32max Json::Value::maxInt
33 #define kint32min Json::Value::minInt
34 #define kuint32max Json::Value::maxUInt
35 #define kint64max Json::Value::maxInt64
36 #define kint64min Json::Value::minInt64
37 #define kuint64max Json::Value::maxUInt64
46 // Json Library test cases
[all …]
/third_party/typescript/src/testRunner/unittests/config/
DconfigurationExtension.ts7 "dev/node_modules/config-box/package.json": JSON.stringify({
10 tsconfig: "./strict.json"
12 "dev/node_modules/config-box/strict.json": JSON.stringify({
17 "dev/node_modules/config-box/unstrict.json": JSON.stringify({
22 "dev/tsconfig.extendsBox.json": JSON.stringify({
28 "dev/tsconfig.extendsStrict.json": JSON.stringify({
34 "dev/tsconfig.extendsUnStrict.json": JSON.stringify({
40 "dev/tsconfig.extendsStrictExtension.json": JSON.stringify({
41 extends: "config-box/strict.json",
46 "dev/node_modules/config-box-implied/package.json": JSON.stringify({
[all …]
/third_party/jsoncpp/src/jsontestrunner/
Dmain.cpp13 /* This executable is used for testing parser/writer using real JSON files.
19 #include <json/json.h>
24 Json::String path;
25 Json::Features features;
28 typedef Json::String (*writeFuncType)(Json::Value const&);
33 static Json::String normalizeFloatingPointStr(double value) { in normalizeFloatingPointStr()
37 Json::String s(buffer); in normalizeFloatingPointStr()
38 Json::String::size_type index = s.find_last_of("eE"); in normalizeFloatingPointStr()
39 if (index != Json::String::npos) { in normalizeFloatingPointStr()
40 Json::String::size_type hasSign = in normalizeFloatingPointStr()
[all …]

12345678910>>...241