DAW JSON Link
daw_json_link.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 
11 #include "impl/version.h"
12 
13 #include "daw_from_json.h"
14 #include "daw_json_apply.h"
15 #include "daw_json_exception.h"
16 #include "daw_json_link_types.h"
17 #include "daw_to_json.h"
19 #include "impl/daw_json_value.h"
20 
22  /***
23  * Construct a json_value from a string literal
24  * @return A json_value representing the json document
25  */
26  constexpr daw::json::json_value operator""_dawjson( char const *ptr,
27  std::size_t sz ) {
28  return daw::json::json_value( ptr, sz );
29  }
30 } // namespace daw::json::literals
31 
32 namespace daw::json {
33  inline namespace DAW_JSON_VER {
34  DAW_CONSTEVAL std::string_view json_link_version( ) {
35 #define DAW_XSTR( x ) DAW_STR( x )
36 #define DAW_STR( x ) std::string_view( #x )
37  return DAW_XSTR( DAW_JSON_VER );
38 #undef DAW_STR
39 #undef DAW_XSTR
40  }
41  } // namespace DAW_JSON_VER
42 } // namespace daw::json
basic_json_value<> json_value
An untyped JSON value.
Customization point traits.
A non-owning container for arbitrary JSON values that allows movement/iteration through.
#define DAW_JSON_VER
The version string used in namespace definitions. Must be a valid namespace name.
Definition: version.h:25