3#include <nlohmann/json.hpp>
4using json = nlohmann::json;
6#include <google/protobuf/util/json_util.h>
38 static constexpr use_json_t use_json{};
Result< json > parseToJson(T message, use_json_t)
Converts a T to a JSON object using JSON.
std::expected< T, ParseError > Result
Definition parse_error.hpp:26
Result< T > parseFromJson(json json, use_json_t)
Converts a JSON string to a T using JSON.
nlohmann::json json
Definition parser.hpp:4
A tag type to indicate whether to use Protobuf or JSON for parsing.
Definition parser.hpp:24
A tag type to indicate whether to use Protobuf or JSON for parsing.
Definition parser.hpp:17