Home
last modified time | relevance | path

Searched refs:to_json (Results 1 – 25 of 46) sorted by relevance

12

/third_party/json/tests/src/
Dunit-noexcept.cpp28 void to_json(json& /*unused*/, pod /*unused*/) noexcept;
29 void to_json(json& /*unused*/, pod_bis /*unused*/);
32 void to_json(json& /*unused*/, pod /*unused*/) noexcept {} in to_json() function
33 void to_json(json& /*unused*/, pod_bis /*unused*/) {} in to_json() function
40 static_assert(noexcept(nlohmann::to_json(*j, 2)), "");
41 static_assert(noexcept(nlohmann::to_json(*j, 2.5)), "");
42 static_assert(noexcept(nlohmann::to_json(*j, true)), "");
43 static_assert(noexcept(nlohmann::to_json(*j, test{})), "");
44 static_assert(noexcept(nlohmann::to_json(*j, pod{})), "");
45 static_assert(!noexcept(nlohmann::to_json(*j, pod_bis{})), "");
[all …]
Dunit-udt.cpp84 static void to_json(BasicJsonType& j, age a) in to_json() function
90 static void to_json(BasicJsonType& j, const name& n) in to_json() function
96 static void to_json(BasicJsonType& j, country c) in to_json() function
115 static void to_json(BasicJsonType& j, const person& p) in to_json() function
120 static void to_json(nlohmann::json& j, const address& a) in to_json() function
125 static void to_json(nlohmann::json& j, const contact& c) in to_json() function
130 static void to_json(nlohmann::json& j, const contact_book& cb) in to_json() function
344 static void to_json(json& j, const std::shared_ptr<T>& opt) in to_json() function
372 static void to_json(json& j, const udt::legacy_type& l) in to_json() function
442 static void to_json(json& j, const type& /*type*/) in to_json() function
[all …]
Dunit-regression2.cpp752 nlohmann::to_json(o["foo"], s);
757 nlohmann::to_json(p["foo"], s);
764 nlohmann::to_json(o["foo"], s);
767 nlohmann::to_json(o["foo"], s);
/third_party/json/include/nlohmann/detail/conversions/
Dto_json.hpp265 inline void to_json(BasicJsonType& j, T b) noexcept in to_json() function
278 inline void to_json(BasicJsonType& j, const BoolRef& b) noexcept in to_json() function
285 inline void to_json(BasicJsonType& j, const CompatibleString& s) in to_json() function
291 inline void to_json(BasicJsonType& j, typename BasicJsonType::string_t&& s) in to_json() function
298 inline void to_json(BasicJsonType& j, FloatType val) noexcept in to_json() function
305 inline void to_json(BasicJsonType& j, CompatibleNumberUnsignedType val) noexcept in to_json() function
312 inline void to_json(BasicJsonType& j, CompatibleNumberIntegerType val) noexcept in to_json() function
320 inline void to_json(BasicJsonType& j, EnumType e) noexcept in to_json() function
328 inline void to_json(BasicJsonType& j, const std::vector<bool>& e) in to_json() function
341 inline void to_json(BasicJsonType& j, const CompatibleArrayType& arr) in to_json() function
[all …]
/third_party/json/docs/mkdocs/docs/api/adl_serializer/
Dto_json.md1 # <small>nlohmann::adl_serializer::</small>to_json
5 static auto to_json(BasicJsonType& j, TargetType && val) noexcept(
6 noexcept(::nlohmann::to_json(j, std::forward<TargetType>(val))))
7 -> decltype(::nlohmann::to_json(j, std::forward<TargetType>(val)), void())
24 …The example below shows how a `to_json` function can be implemented for a user-defined type. This …
28 --8<-- "examples/to_json.cpp"
34 --8<-- "examples/to_json.output"
Dindex.md9 `to_json`/`from_json` functions from the types' namespaces.
17 static void to_json(BasicJsonType& j, const T& value) {
18 // calls the "to_json" method in T's namespace
31 - [**to_json**](to_json.md) - convert any value type to a JSON value
Dfrom_json.md69 - [to_json](to_json.md)
/third_party/json/docs/mkdocs/docs/features/
Darbitrary_types.md60 void to_json(json& j, const person& p) {
72 That's all! When calling the `json` constructor with your type, your custom `to_json` method will b…
86 If you just want to serialize/deserialize some structs, the `to_json`/`from_json` functions can be …
100 …types with more than 64 member variables, you need to define the `to_json`/`from_json` functions m…
106 The `to_json`/`from_json` functions for the `person` struct above can be created with:
142 static void to_json(json& j, const T& value) {
143 // calls the "to_json" method in T's namespace
161 static void to_json(json& j, const boost::optional<T>& opt) {
165 j = *opt; // this will call adl_serializer<T>::to_json which will
166 // find the free function to_json in T's namespace!
[all …]
/third_party/json/docs/mkdocs/docs/api/macros/
Djson_disable_enum_serialization.md35 … create default serialization/deserialization functions `from_json` and `to_json`, meaning the cod…
52 …// normally invokes to_json serialization function but with JSON_DISABLE_ENUM_SERIALIZATION define…
62 …not** to create default serialization/deserialization functions `from_json` and `to_json`, but uses
85 // uses user-defined to_json function defined by macro
95 … create default serialization/deserialization functions `from_json` and `to_json`, but uses user-d…
123 void to_json(json& j, const Choice& ch)
138 // uses user-defined to_json function
Dnlohmann_define_type_non_intrusive.md33 void to_json(nlohmann::json&, const type&);
53 …with more than 64 member variables, you need to define the `to_json`/`from_json` functions manuall…
Dnlohmann_define_type_intrusive.md33 friend void to_json(nlohmann::json&, const type&);
52 …with more than 64 member variables, you need to define the `to_json`/`from_json` functions manuall…
/third_party/json/include/nlohmann/
Dadl_serializer.hpp47 static auto to_json(BasicJsonType& j, TargetType && val) noexcept( in to_json() function
48 noexcept(::nlohmann::to_json(j, std::forward<TargetType>(val)))) in to_json()
49 -> decltype(::nlohmann::to_json(j, std::forward<TargetType>(val)), void()) in to_json()
51 ::nlohmann::to_json(j, std::forward<TargetType>(val)); in to_json()
/third_party/mesa3d/src/amd/registers/
Dregdb.py122 def to_json(obj): member in Object
124 return dict((k, Object.to_json(v)) for k, v in obj.__dict__.items())
126 return dict((k, Object.to_json(v)) for k, v in obj.items())
128 return [Object.to_json(v) for v in obj]
632 regtype = Object.from_json(Object.to_json(self.__register_types[type_ref]))
683 regmap = Object.from_json(Object.to_json(regmap))
711 regmap = Object.from_json(Object.to_json(regmap))
715 regtype = Object.from_json(Object.to_json(other.__register_types[type_ref]))
723 enum = Object.from_json(Object.to_json(other.__enums[enum_ref]))
749 def to_json(self): member in RegisterDatabase
[all …]
/third_party/protobuf/conformance/
Dconformance_ruby.rb88 response.json_payload = test_message.to_json
122 STDERR.puts("conformance_ruby: request=#{request.to_json}, " \
123 "response=#{response.to_json}\n")
/third_party/protobuf/ruby/tests/
Dencode_decode_test.rb66 json = msg.to_json
72 json = msg.to_json({ preserve_proto_fieldnames: true })
/third_party/mesa3d/bin/pick/
Dcore_test.py48 v = c.to_json()
55 v = c.to_json()
68 v = c.to_json()
74 v = c.to_json()
/third_party/json/docs/mkdocs/docs/api/basic_json/
Dbasic_json.md13 JSONSerializer<U>::to_json(std::declval<basic_json_t&>(),
58 …catch all" constructor for all compatible JSON types; that is, types for which a `to_json()` method
59 …nstructor forwards the parameter `val` to that method (to `json_serializer<U>::to_json` method with
141 …- `json_serializer<U>` (with `U = uncvref_t<CompatibleType>`) has a `to_json(basic_json_t&, Compat…
191 …`to_json()` function was provided), strong guarantee holds: if an exception is thrown, there are n…
194 …`to_json()` function was provided), strong guarantee holds: if an exception is thrown, there are n…
230 …ear in the size of the passed `val`, also depending on the implementation of the called `to_json()`
232 …ear in the size of the passed `val`, also depending on the implementation of the called `to_json()`
Djson_serializer.md11 : type to convert; will be used in the `to_json`/`from_json` functions
/third_party/nghttp2/src/
Dinflatehd.cc74 static void to_json(nghttp2_hd_inflater *inflater, json_t *headers, in to_json() function
167 to_json(inflater, headers, wire, seq, old_settings_table_size); in inflate_hd()
/third_party/jerryscript/jerry-core/ecma/builtin-objects/
Decma-builtin-json.c1136 … ecma_value_t to_json = ecma_op_object_get_by_magic_id (value_obj_p, LIT_MAGIC_STRING_TO_JSON_UL); in ecma_builtin_json_serialize_property() local
1138 if (ECMA_IS_VALUE_ERROR (to_json)) in ecma_builtin_json_serialize_property()
1141 return to_json; in ecma_builtin_json_serialize_property()
1145 if (ecma_op_is_callable (to_json)) in ecma_builtin_json_serialize_property()
1149 ecma_object_t *to_json_obj_p = ecma_get_object_from_value (to_json); in ecma_builtin_json_serialize_property()
1162 ecma_free_value (to_json); in ecma_builtin_json_serialize_property()
/third_party/json/docs/examples/
Dto_json.cpp19 void to_json(json& j, const person& p) in to_json() function
Dnlohmann_json_namespace_begin.c++17.cpp10 static void to_json(json& j, const std::optional<T>& opt) in to_json() function
Dfrom_json__non_default_constructible.cpp34 static void to_json(json& j, ns::person p) in to_json() function
Dnlohmann_define_type_non_intrusive_explicit.cpp16 void to_json(nlohmann::json& nlohmann_json_j, const person& nlohmann_json_t) in to_json() function
/third_party/musl/scripts/
Dprint_so_deps.py108 to_json = json.dumps(self.soname_deps)
109 f.write(to_json)

12