Decentralised Art Server
High-performance C++ backend that exposes HTML interface and a secure REST API for managing Performative Transactions entities
Loading...
Searching...
No Matches
parser.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <nlohmann/json.hpp>
4
using
json
= nlohmann::json;
5
6
#include <google/protobuf/util/json_util.h>
7
8
namespace
dcn::parse
9
{
10
struct
use_protobuf_t
{};
11
12
struct
use_json_t
{};
13
19
static
constexpr
use_protobuf_t
use_protobuf{};
20
26
static
constexpr
use_json_t use_json{};
27
28
29
template
<
class
T>
30
std::optional<T>
parseFromJson
(
json
json
,
use_json_t
);
31
32
template
<
class
T>
33
std::optional<T>
parseFromJson
(std::string
json_str
,
use_protobuf_t
);
34
}
dcn::parse
Definition
auth.hpp:34
dcn::parse::parseFromJson
std::optional< T > parseFromJson(json json, use_json_t)
Parses a JSON object to a Transformation object.
dcn::RouteArgRequirement::optional
@ optional
json
nlohmann::json json
Definition
parser.hpp:4
dcn::parse::use_json_t
Definition
parser.hpp:12
dcn::parse::use_protobuf_t
Definition
parser.hpp:10
src
parser
include
parser.hpp
Generated by
1.9.8