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
13#include <daw/daw_cpp20_concept.h>
14
15#include <type_traits>
16
17namespace daw::json {
18 inline namespace DAW_JSON_VER {
21 template<typename>
23
24 template<typename T>
25 inline constexpr bool is_missing_data_contract_or_unknown_type_v = false;
26
27 template<>
28 inline constexpr bool is_missing_data_contract_or_unknown_type_v<void> =
29 true;
30
31 template<typename T>
34
39 template<typename T, typename = void>
43
45 template<typename T>
47
48 namespace json_details {
49 template<typename T>
50 DAW_CPP20_CONCEPT has_json_data_contract_trait_v =
51 not std::is_same_v<missing_json_data_contract_for_or_unknown_type<T>,
53
55 has_json_to_json_data_v,
56 json_data_contract<T>::to_json_data( std::declval<T &>( ) ) );
57
59 is_submember_tagged_variant_v,
61 } // namespace json_details
62 } // namespace DAW_JSON_VER
63} // 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