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#include "daw_from_json.h"
11#include "daw_json_exception.h"
12#include "daw_json_link_types.h"
13#include "daw_to_json.h"
15#include "impl/daw_json_value.h"
16#include "impl/version.h"
17
19 /***
20 * Construct a json_value from a string literal
21 * @return A json_value representing the json document
22 */
23 constexpr daw::json::json_value operator"" _dawjson( char const *ptr,
24 std::size_t sz ) {
25 return daw::json::json_value( std::string_view( ptr, sz ) );
26 }
27} // namespace daw::json::literals
28
29namespace daw::json {
30 inline namespace DAW_JSON_VER {
31 constexpr std::string_view json_link_version( ) {
32#define DAW_XSTR( x ) DAW_STR( x )
33#define DAW_STR( x ) std::string_view( #x )
34 constexpr std::string_view version = DAW_XSTR( DAW_JSON_VER );
35#undef DAW_STR
36#undef DAW_XSTR
37 return version;
38 }
39 } // namespace DAW_JSON_VER
40} // namespace daw::json
Definition: daw_json_value.h:320
constexpr std::string_view json_link_version()
Definition: daw_json_link.h:31
basic_json_value< NoCommentSkippingPolicyChecked > json_value
Definition: daw_json_link_types.h:1906
Definition: daw_json_link.h:18
Definition: daw_from_json.h:22
#define DAW_JSON_VER
The version string used in namespace definitions. Must be a valid namespace name.
Definition: version.h:16