DAW JSON Link
Loading...
Searching...
No Matches
daw_json_data_contract.h
Go to the documentation of this file.
1// Copyright (c) Darrell Wright
2//
3// Distributed under the Boost Software License, Version 1.0. (See accompanying
4// file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)
5//
6// Official repository: https://github.com/beached/daw_json_link
7//
8
9#pragma once
10
12
14
15#include <daw/daw_cpp20_concept.h>
16
17#include <type_traits>
18
19namespace daw::json {
20 inline namespace DAW_JSON_VER {
23 template<typename>
25
26 template<typename T>
27 inline constexpr bool is_missing_data_contract_or_unknown_type_v = false;
28
29 template<>
30 inline constexpr bool is_missing_data_contract_or_unknown_type_v<void> =
31 true;
32
33 template<typename T>
36
41 template<typename T, typename = void>
45
47 template<typename T>
49
50 namespace json_details {
51 template<typename T>
52 DAW_CPP20_CONCEPT has_json_data_contract_trait_v =
53 not std::is_same_v<missing_json_data_contract_for_or_unknown_type<T>,
55
57 has_json_to_json_data_v,
58 json_data_contract<T>::to_json_data( std::declval<T &>( ) ) );
59
61 is_submember_tagged_variant_v,
63 } // namespace json_details
64 } // namespace DAW_JSON_VER
65} // namespace daw::json
#define DAW_JSON_MAKE_REQ_TYPE_ALIAS_TRAIT(Name,...)
#define DAW_JSON_MAKE_REQ_TRAIT(Name,...)
typename json_data_contract< T >::type json_data_contract_trait_t
This trait gets us the mapping type from the contract.
Customization point traits.
Mapping class for JSON data structures to C++. It must be specialized in order to parse to a user cla...
This class is used as a way to indicate that a json_data_contract specialization has not been done fo...
#define DAW_JSON_VER
The version string used in namespace definitions. Must be a valid namespace name.
Definition version.h:20