15 #include <daw/daw_traits.h>
18 #include <type_traits>
22 namespace json_details {
24 is_opted_into_json_iostreams_v,
27 template<
typename,
typename =
void>
28 inline constexpr
bool is_container_opted_into_json_iostreams_v =
false;
30 template<
typename Container>
31 inline constexpr
bool is_container_opted_into_json_iostreams_v<
32 Container, std::void_t<typename Container::value_type>> =
33 is_opted_into_json_iostreams_v<typename Container::value_type>;
41 daw::json::json_details::is_opted_into_json_iostreams_v<T> )>
43 std::ostream &operator<<(
std::ostream &os, T const &value ) {
50 daw::json::json_details::is_container_opted_into_json_iostreams_v<
53 daw::json::json_details::is_container_opted_into_json_iostreams_v<Container> )
55 operator<<( std::ostream &os, Container
const &c ) {
DAW_JSON_REQUIRES(daw::json::json_details::is_container_opted_into_json_iostreams_v< Container >) std
An opt in ostream interface for containers of types that have JSON mappings.
std::ostream & operator<<(std::ostream &os, T const &value)
An opt in ostream interface for types that have JSON mappings.
#define DAW_JSON_ENABLEIF(...)
DAW_JSON_MAKE_REQ_TYPE_ALIAS_TRAIT(ignore_unknown_members_v, json_data_contract< T >::ignore_unknown_members)
std::string to_json(Value const &value, options::output_flags_t< PolicyFlags... > flgs)
std::string to_json_array(Container const &c, options::output_flags_t< PolicyFlags... > flgs)
Customization point traits.
Mapping class for JSON data structures to C++. It must be specialized in order to parse to a user cla...
#define DAW_JSON_VER
The version string used in namespace definitions. Must be a valid namespace name.