simdjson  3.11.0
Ridiculously Fast JSON
serialization.h
1 #ifndef SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H
2 
3 #ifndef SIMDJSON_CONDITIONAL_INCLUDE
4 #define SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H
5 #include "simdjson/generic/ondemand/base.h"
6 #endif // SIMDJSON_CONDITIONAL_INCLUDE
7 
8 namespace simdjson {
14 inline simdjson_result<std::string_view> to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::document& x) noexcept;
21 inline simdjson_result<std::string_view> to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::value& x) noexcept;
27 inline simdjson_result<std::string_view> to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::object& x) noexcept;
33 inline simdjson_result<std::string_view> to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::array& x) noexcept;
34 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document> x);
35 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> x);
36 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> x);
37 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> x);
38 } // namespace simdjson
39 
47 namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand {
48 
57 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value x);
58 #if SIMDJSON_EXCEPTIONS
60 #endif
69 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array value);
70 #if SIMDJSON_EXCEPTIONS
72 #endif
81 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document& value);
82 #if SIMDJSON_EXCEPTIONS
84 #endif
85 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_reference& value);
86 #if SIMDJSON_EXCEPTIONS
88 #endif
97 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object value);
98 #if SIMDJSON_EXCEPTIONS
100 #endif
101 }}} // namespace simdjson::SIMDJSON_IMPLEMENTATION::ondemand
102 
103 #endif // SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H
A document_reference is a thin wrapper around a document reference instance.
Definition: document.h:745
A forward-only JSON object field iterator.
Definition: object.h:17
An ephemeral JSON value returned during iteration.
Definition: value.h:21
std::ostream & operator<<(std::ostream &out, json_type type) noexcept
Write the JSON type to the output stream.
Definition: json_type-inl.h:14
The top level simdjson namespace, containing everything the library provides.
Definition: base.h:8
simdjson_result< std::string_view > to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::document &x) noexcept
Create a string-view instance out of a document instance.
The result of a simdjson operation that could fail.
Definition: error.h:215