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 File Reference
#include <nlohmann/json.hpp>
#include <google/protobuf/util/json_util.h>
#include "parse_error.hpp"

Go to the source code of this file.

Classes

struct  dcn::parse::use_protobuf_t
 A tag type to indicate whether to use Protobuf or JSON for parsing. More...
 
struct  dcn::parse::use_json_t
 A tag type to indicate whether to use Protobuf or JSON for parsing. More...
 

Namespaces

namespace  dcn
 
namespace  dcn::parse
 

Typedefs

using json = nlohmann::json
 

Functions

template<class T >
Result< T > dcn::parse::parseFromJson (json json, use_json_t)
 Converts a JSON string to a T using JSON.
 
template<class T >
Result< T > dcn::parse::parseFromJson (std::string json_str, use_protobuf_t)
 Converts a JSON string to a T using Protobuf.
 
template<class T >
Result< jsondcn::parse::parseToJson (T message, use_json_t)
 Converts a T to a JSON object using JSON.
 
template<class T >
Result< std::string > dcn::parse::parseToJson (T message, use_protobuf_t)
 Converts a T to a JSON string using Protobuf.
 

Typedef Documentation

◆ json

using json = nlohmann::json