MantisBase
v0.4.9
Loading...
Searching...
No Matches
script_json.h
Go to the documentation of this file.
1
10
11
#ifndef MANTISBASE_SCRIPTING_SCRIPT_JSON_H
12
#define MANTISBASE_SCRIPTING_SCRIPT_JSON_H
13
14
#include <nlohmann/json.hpp>
15
#include <type_traits>
16
#include <utility>
17
18
namespace
mb
{
19
struct
MbScriptJson
{
20
nlohmann::json
value
;
21
22
MbScriptJson
() =
default
;
23
MbScriptJson
(
const
MbScriptJson
&) =
default
;
24
MbScriptJson
(
MbScriptJson
&&) noexcept = default;
25
MbScriptJson
&operator=(const
MbScriptJson
&) = default;
26
MbScriptJson
&operator=(
MbScriptJson
&&) noexcept = default;
27
28
template<typename T, typename =
std
::enable_if_t<
std
::is_same_v<
std
::decay_t<T>, nlohmann::
json
>>>
29
explicit
MbScriptJson
(T &&
json
) :
value
(
std
::forward<T>(
json
)) {}
30
};
31
}
32
33
#endif
mb
Definition
api_keys.h:35
mb::json
nlohmann::json json
Shorten JSON namespace.
Definition
api_keys.h:36
std
Definition
utils.h:35
mb::MbScriptJson::MbScriptJson
MbScriptJson()=default
mb::MbScriptJson::value
nlohmann::json value
Definition
script_json.h:20
mb::MbScriptJson::MbScriptJson
MbScriptJson(MbScriptJson &&) noexcept=default
mb::MbScriptJson::MbScriptJson
MbScriptJson(const MbScriptJson &)=default
include
mantisbase
scripting
script_json.h
Generated by
1.15.0