|
std::optional< bool > | to_bool (const std::string &value) |
|
std::optional< bool > | to_bool (const rapidjson::Value &value) |
|
std::string | merge_objects (const std::string &j1, const std::string &j2, const std::set< std::string > &skip_attributes) |
|
std::optional< std::string > | merge_objects (std::optional< std::string > j1, std::optional< std::string > j2, const std::set< std::string > &skip_attributes) |
|
template<typename Obj > |
auto | member_iterator (Obj &o) |
|
auto | array_iterator (const rapidjson::Value::ConstArray &o) |
|
auto | array_iterator (rapidjson::Value::Array &o) |
|
template<template< typename > typename Writer = Writer, typename JsonValue > |
void | rapid_json_to_text (JsonValue *json_value, std::string &text_value) |
|
template<template< typename > typename Writer = Writer, typename JsonValue > |
void | append_rapid_json_to_text (JsonValue *json_value, std::string &text_value) |
|
std::string | to_string (const rapidjson::Value &value) |
|
bool | validate_json_with_schema (const std::string &json, const std::string &schema, std::string *error_description=nullptr) |
|
template<typename Handler , typename Container > |
bool | text_to (Handler *handler, const Container &c) |
| Convert text representation of json object/value to type defined by 'Handler'. More...
|
|
template<typename Container > |
bool | text_to (rapidjson::Document *doc, const Container &c) |
|
bool | text_to (rapidjson::Document *doc, const std::string &str) |
|
bool | text_to (rapidjson::Document *doc, const char *str) |
|
bool | text_to (rapidjson::Document::Object *obj, const std::string &str) |
|
bool | text_to (rapidjson::Value *val, const std::string &str) |
|
template<typename Handler , typename Container , typename... HandlerArgs> |
Handler::Result | text_to_handler (const Container &c, HandlerArgs &&...args) |
| Convert text representation of json object/value to type defined by 'Handler'. More...
|
|
rapidjson::Document | text_to_document (const std::string &str) |
|
template<typename Stream , typename Value > |
Stream & | to_stream (Stream &stream, const rapidjson::Value &v, const Value &k_true, const Value &k_false) |
|
std::string | to_string (const MapObject &map) |
|
template<typename RapidJson > |
std::string | to_string (const RapidJson &v) |
|
template<typename Handler , typename Container >
bool helper::json::text_to |
( |
Handler * |
handler, |
|
|
const Container & |
c |
|
) |
| |
Convert text representation of json object/value to type defined by 'Handler'.
The 'Handler' must be a child class of rapidjson::BaseReaderHandler
. The child class must contain type/alias definition of returned result, under "Result" alias and get_result
method. For example:
class HandlerSomeExample
: rapidjson::BaseReaderHandler<rapidjson::UTF8<>,HandlerSomeExample>
{ public: using Result = std::string;
...
};
template<typename Handler , typename Container , typename... HandlerArgs>
Handler::Result helper::json::text_to_handler |
( |
const Container & |
c, |
|
|
HandlerArgs &&... |
args |
|
) |
| |
Convert text representation of json object/value to type defined by 'Handler'.
The 'Handler' must be a child class of rapidjson::BaseReaderHandler
. The child class must contain type/alias definition of returned result, under "Result" alias and get_result
method. For example:
class HandlerSomeExample
: rapidjson::BaseReaderHandler<rapidjson::UTF8<>,HandlerSomeExample>
{ public: using Result = std::string;
...
};