Searched full:json (Results 1 – 25 of 5568) sorted by relevance
12345678910>>...223
2 // __| | __| | | | JSON for Modern C++ (supporting code)4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json11 #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 …]
2 // __| | __| | | | JSON for Modern C++ (supporting code)4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json20 #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 …]
2 // __| | __| | | | JSON for Modern C++ (supporting code)4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json12 #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 …]
2 // __| | __| | | | JSON for Modern C++ (supporting code)4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json12 #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 …]
2 // __| | __| | | | JSON for Modern C++ (supporting code)4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json12 #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 …]
2 // __| | __| | | | JSON for Modern C++ (supporting code)4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json18 #include <nlohmann/json.hpp>19 using nlohmann::json;30 …json 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 …]
2 // __| | __| | | | JSON for Modern C++ (supporting code)4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json11 #include <nlohmann/json.hpp>12 using nlohmann::json;16 // create a JSON value with different types17 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 …]
2 // __| | __| | | | JSON for Modern C++ (supporting code)4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json11 #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 …]
2 // __| | __| | | | JSON for Modern C++ (supporting code)4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json11 #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;38 … json const patch1 = R"([{ "op": "add", "path": "/a/b", "value": [ "foo", "bar" ] }])"_json;[all …]
2 // __| | __| | | | JSON for Modern C++ (supporting code)4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json18 #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 …]
2 // __| | __| | | | JSON for Modern C++ (supporting code)4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json12 #include <nlohmann/json.hpp>20 TEST_CASE_TEMPLATE("element access 2", Json, nlohmann::json, nlohmann::ordered_json)24 …Json 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 …]
2 // __| | __| | | | JSON for Modern C++ (supporting code)4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json11 #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 …]
2 // __| | __| | | | JSON for Modern C++ (supporting code)4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json11 #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 …]
2 // __| | __| | | | JSON for Modern C++ (supporting code)4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json12 #include <nlohmann/json.hpp>13 using nlohmann::json;37 bool number_integer(json::number_integer_t val) in number_integer()43 bool number_unsigned(json::number_unsigned_t val) in number_unsigned()49 bool number_float(json::number_float_t /*unused*/, const std::string& s) in number_float()61 bool binary(json::binary_t& val) in binary()120 …bool parse_error(std::size_t position, const std::string& /*unused*/, const json::exception& /*unu… in parse_error()131 class SaxCountdown : public nlohmann::json::json_sax_t[all …]
2 // __| | __| | | | JSON for Modern C++ (supporting code)4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json12 #include <nlohmann/json.hpp>13 using nlohmann::json;42 bool number_integer(json::number_integer_t /*unused*/) in number_integer()47 bool number_unsigned(json::number_unsigned_t /*unused*/) in number_unsigned()52 bool number_float(json::number_float_t /*unused*/, const std::string& /*unused*/) in number_float()92 …bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, const json::exception& /*u… in parse_error()215 …nlohmann::detail::binary_reader<json, decltype(ia)> const br{std::move(ia), json::input_format_t::…226 json const j = json::value_t::discarded;[all …]
2 // __| | __| | | | JSON for Modern C++ (supporting code)4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json12 #include <nlohmann/json.hpp>13 using nlohmann::json;21 TEST_CASE("JSON pointers")25 CHECK_THROWS_WITH_AS(json::json_pointer("foo"),26 …"[json.exception.parse_error.107] parse error at byte 1: JSON pointer must be empty or begin with …28 CHECK_THROWS_WITH_AS(json::json_pointer("/~~"),29 …"[json.exception.parse_error.108] parse error: escape character '~' must be followed with '0' or '…31 CHECK_THROWS_WITH_AS(json::json_pointer("/~"),[all …]
111 GroupScope(JsonSerializer *json, const std::string &name) : mJson(json) in GroupScope() argument116 GroupScope(JsonSerializer *json, const std::string &name, int index) : mJson(json) in GroupScope() argument124 GroupScope(JsonSerializer *json, int index) : GroupScope(json, "", index) {} in GroupScope() argument132 void SerializeColorF(JsonSerializer *json, const ColorF &color) in SerializeColorF() argument134 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() argument142 GroupScope group(json, groupName); in SerializeColorFWithGroup()[all …]
2 "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 …]
2 "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 …]
2 "Found 'package.json' at 'tests/cases/conformance/node/package.json'.",3 "'package.json' does not have a 'typesVersions' field.",7 "File 'tests/cases/conformance/node/package.json' exists according to earlier cached lookups.",16 "File 'tests/cases/conformance/node/package.json' exists according to earlier cached lookups.",25 "File 'tests/cases/conformance/node/package.json' exists according to earlier cached lookups.",34 "File 'tests/cases/conformance/node/package.json' exists according to earlier cached lookups.",43 "File 'tests/cases/conformance/node/package.json' exists according to earlier cached lookups.",52 "File 'tests/cases/conformance/node/package.json' exists according to earlier cached lookups.",85 "File 'package.json' does not exist.",86 "File '/package.json' does not exist.",[all …]
4 ## [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 …]
7 All exceptions inherit from class `json::exception` (which in turn inherits from `std::exception`).…10 std::exception <|-- json::exception11 json::exception <|-- json::parse_error12 json::exception <|-- json::invalid_iterator13 json::exception <|-- json::type_error14 json::exception <|-- json::out_of_range15 json::exception <|-- json::other_error19 class json::exception {24 class json::parse_error {50 #include <nlohmann/json.hpp>[all …]
98 "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", // 216x216105 "skottie/skottie-phonehub-connecting.json"));106 DEF_BENCH(return new SkottieDecodeBench("skottie_phonehub_generic_error.json", // 216x217107 "skottie/skottie-phonehub-generic-error.json"));108 DEF_BENCH(return new SkottieDecodeBench("skottie_phonehub_onboard.json", // 217x217109 "skottie/skottie-phonehub-onboard.json"));112 DEF_BENCH(return new SkottieDecodeBench("skottie_phonehub_svgo_connecting.json",[all …]
... jsoncpp-1.9.5/devtools/agent_vmw7.json jsoncpp-1.9.5/devtools/agent_vmxp. ...