Home
last modified time | relevance | path

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

12

/third_party/json/test/src/
Dunit-noexcept.cpp49 void to_json(json& /*unused*/, pod /*unused*/) noexcept;
50 void to_json(json& /*unused*/, pod_bis /*unused*/);
53 void to_json(json& /*unused*/, pod /*unused*/) noexcept {} in to_json() function
54 void to_json(json& /*unused*/, pod_bis /*unused*/) {} in to_json() function
61 static_assert(noexcept(nlohmann::to_json(*j, 2)), "");
62 static_assert(noexcept(nlohmann::to_json(*j, 2.5)), "");
63 static_assert(noexcept(nlohmann::to_json(*j, true)), "");
64 static_assert(noexcept(nlohmann::to_json(*j, test{})), "");
65 static_assert(noexcept(nlohmann::to_json(*j, pod{})), "");
66 static_assert(!noexcept(nlohmann::to_json(*j, pod_bis{})), "");
[all …]
Dunit-udt.cpp103 static void to_json(BasicJsonType& j, age a) in to_json() function
109 static void to_json(BasicJsonType& j, const name& n) in to_json() function
115 static void to_json(BasicJsonType& j, country c) in to_json() function
134 static void to_json(BasicJsonType& j, const person& p) in to_json() function
139 static void to_json(nlohmann::json& j, const address& a) in to_json() function
144 static void to_json(nlohmann::json& j, const contact& c) in to_json() function
149 static void to_json(nlohmann::json& j, const contact_book& cb) in to_json() function
363 static void to_json(json& j, const std::shared_ptr<T>& opt) in to_json() function
391 static void to_json(json& j, const udt::legacy_type& l) in to_json() function
461 static void to_json(json& j, const type& /*type*/) in to_json() function
[all …]
Dunit-regression2.cpp630 nlohmann::to_json(o["foo"], s);
635 nlohmann::to_json(p["foo"], s);
642 nlohmann::to_json(o["foo"], s);
645 nlohmann::to_json(o["foo"], s);
Dunit-regression1.cpp81 static void to_json(BasicJsonType& j, const T& value) in to_json() function
96 …static void to_json(BasicJsonType& j, const T& value) noexcept // NOLINT(bugprone-exception-escape) in to_json() function
98 ::nlohmann::to_json(j, value); in to_json()
127 friend void to_json(json& j, const nocopy& n) in to_json() function
/third_party/json/include/nlohmann/detail/conversions/
Dto_json.hpp255 void to_json(BasicJsonType& j, T b) noexcept in to_json() function
262 void to_json(BasicJsonType& j, const CompatibleString& s) in to_json() function
268 void to_json(BasicJsonType& j, typename BasicJsonType::string_t&& s) in to_json() function
275 void to_json(BasicJsonType& j, FloatType val) noexcept in to_json() function
282 void to_json(BasicJsonType& j, CompatibleNumberUnsignedType val) noexcept in to_json() function
289 void to_json(BasicJsonType& j, CompatibleNumberIntegerType val) noexcept in to_json() function
296 void to_json(BasicJsonType& j, EnumType e) noexcept in to_json() function
303 void to_json(BasicJsonType& j, const std::vector<bool>& e) in to_json() function
316 void to_json(BasicJsonType& j, const CompatibleArrayType& arr) in to_json() function
322 void to_json(BasicJsonType& j, const typename BasicJsonType::binary_t& bin) in to_json() function
[all …]
/third_party/json/doc/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 …
101 The `to_json`/`from_json` functions for the `person` struct above can be created with:
137 static void to_json(json& j, const T& value) {
138 // calls the "to_json" method in T's namespace
156 static void to_json(json& j, const boost::optional<T>& opt) {
160 j = *opt; // this will call adl_serializer<T>::to_json which will
161 // find the free function to_json in T's namespace!
200 // Here's the catch! You must provide a to_json method! Otherwise you
[all …]
Denum_conversion.md25 The `NLOHMANN_JSON_SERIALIZE_ENUM()` macro declares a set of `to_json()` / `from_json()` functions …
/third_party/json/doc/mkdocs/docs/api/
Dadl_serializer.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** - convert any value type to a JSON value
/third_party/json/include/nlohmann/
Dadl_serializer.hpp66 static auto to_json(BasicJsonType& j, TargetType && val) noexcept( in to_json() function
67 noexcept(::nlohmann::to_json(j, std::forward<TargetType>(val)))) in to_json()
68 -> decltype(::nlohmann::to_json(j, std::forward<TargetType>(val)), void()) in to_json()
70 ::nlohmann::to_json(j, std::forward<TargetType>(val)); in to_json()
Djson.hpp1571 JSONSerializer<U>::to_json(std::declval<basic_json_t&>(), in basic_json()
1574 JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val)); in basic_json()
1622 … JSONSerializer<other_boolean_t>::to_json(*this, val.template get<other_boolean_t>()); in basic_json()
1625 … JSONSerializer<other_number_float_t>::to_json(*this, val.template get<other_number_float_t>()); in basic_json()
1628 …JSONSerializer<other_number_integer_t>::to_json(*this, val.template get<other_number_integer_t>()); in basic_json()
1631 …JSONSerializer<other_number_unsigned_t>::to_json(*this, val.template get<other_number_unsigned_t>(… in basic_json()
1634 … JSONSerializer<other_string_t>::to_json(*this, val.template get_ref<const other_string_t&>()); in basic_json()
1637 … JSONSerializer<other_object_t>::to_json(*this, val.template get_ref<const other_object_t&>()); in basic_json()
1640 … JSONSerializer<other_array_t>::to_json(*this, val.template get_ref<const other_array_t&>()); in basic_json()
1643 … JSONSerializer<other_binary_t>::to_json(*this, val.template get_ref<const other_binary_t&>()); in basic_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 })
Dcommon_tests.rb822 json = m.to_json
849 assert_equal m.to_json, encoded_msg
852 assert_equal proto_module::TestMessage.decode_json(m.to_json), decoded_msg
1245 assert_equal json, struct.to_json
1249 assert_equal json, proto_module::MyRepeatedStruct.decode(encoded).structs[0].struct.to_json
1256 assert_equal json, struct.to_json
1296 m3 = proto_module::Wrapper.decode_json(m.to_json)
Dbasic.rb418 }.to_json, { ignore_unknown_fields: true })
422 TestMessage.decode_json({ not_in_message: "some_value" }.to_json)
/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()
Dcore.py124 def to_json(self) -> 'CommitDict': member in Commit
385 json.dump([c.to_json() for c in commits], f, indent=4)
/third_party/json/doc/mkdocs/docs/api/basic_json/
Dbasic_json.md13 JSONSerializer<U>::to_json(std::declval<basic_json_t&>(),
56 …catch all" constructor for all compatible JSON types; that is, types for which a `to_json()` method
57 …nstructor forwards the parameter `val` to that method (to `json_serializer<U>::to_json` method with
136 …- `json_serializer<U>` (with `U = uncvref_t<CompatibleType>`) has a `to_json(basic_json_t&, Compat…
207 …`to_json()` function was provided), strong guarantee holds: if an exception is thrown, there are n…
210 …`to_json()` function was provided), strong guarantee holds: if an exception is thrown, there are n…
222 …ear in the size of the passed `val`, also depending on the implementation of the called `to_json()`
224 …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/musl/scripts/
Dprint_so_deps.py108 to_json = json.dumps(self.soname_deps)
109 f.write(to_json)
/third_party/skia/third_party/externals/angle2/third_party/logdog/logdog/
Dstream.py69 def to_json(self): member in StreamParams
371 params_bytes = params.to_json().encode('utf-8')
/third_party/json/
DREADME.md713 void to_json(json& j, const person& p) {
725 That's all! When calling the `json` constructor with your type, your custom `to_json` method will b…
738 If you just want to serialize/deserialize some structs, the `to_json`/`from_json` functions can be …
749 The `to_json`/`from_json` functions for the `person` struct above can be created with:
785 static void to_json(json& j, const T& value) {
786 // calls the "to_json" method in T's namespace
804 static void to_json(json& j, const boost::optional<T>& opt) {
808 j = *opt; // this will call adl_serializer<T>::to_json which will
809 // find the free function to_json in T's namespace!
848 // Here's the catch! You must provide a to_json method! Otherwise you
[all …]
/third_party/json/single_include/nlohmann/
Djson.hpp2312 inline void to_json(BasicJsonType& j, const ENUM_TYPE& e) \
2495 …friend void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_…
2504 …inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_…
3495 using to_json_function = decltype(T::to_json(std::declval<Args>()...));
4781 void to_json(BasicJsonType& j, T b) noexcept in to_json() function
4788 void to_json(BasicJsonType& j, const CompatibleString& s) in to_json() function
4794 void to_json(BasicJsonType& j, typename BasicJsonType::string_t&& s) in to_json() function
4801 void to_json(BasicJsonType& j, FloatType val) noexcept in to_json() function
4808 void to_json(BasicJsonType& j, CompatibleNumberUnsignedType val) noexcept in to_json() function
4815 void to_json(BasicJsonType& j, CompatibleNumberIntegerType val) noexcept in to_json() function
[all …]

12