![]() |
MySQL 9.3.0
Source Code Documentation
|
Namespaces | |
namespace | sql |
Classes | |
class | ExtractSubObjectHandler |
class | IterableArray |
class | IterableObject |
class | RapidReaderHandlerStringValuesToStruct |
class | RapidReaderHandlerToMapOfSimpleValues |
This class is a adapter for Reader from RapidJson. More... | |
class | RapidReaderHandlerToStruct |
This class is a adapter for Reader from RapidJson. More... | |
class | SerializerToText |
Typedefs | |
template<typename T > | |
using | Writer = rapidjson::Writer< T > |
using | MapObject = std::map< std::string, std::string > |
std::map that represents simple JSON object. More... | |
Functions | |
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) |
using helper::json::MapObject = typedef std::map<std::string, std::string> |
std::map that represents simple JSON object.
This type can hold only JSON Objects that consist only from string values, other types are going to be ignored or converted.
using helper::json::Writer = typedef rapidjson::Writer<T> |
void helper::json::append_rapid_json_to_text | ( | JsonValue * | json_value, |
std::string & | text_value | ||
) |
|
inline |
|
inline |
auto helper::json::member_iterator | ( | Obj & | o | ) |
std::string helper::json::merge_objects | ( | const std::string & | j1, |
const std::string & | j2, | ||
const std::set< std::string > & | skip_attributes | ||
) |
std::optional< std::string > helper::json::merge_objects | ( | std::optional< std::string > | j1, |
std::optional< std::string > | j2, | ||
const std::set< std::string > & | skip_attributes | ||
) |
void helper::json::rapid_json_to_text | ( | JsonValue * | json_value, |
std::string & | text_value | ||
) |
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;
... };
|
inline |
bool helper::json::text_to | ( | rapidjson::Document * | doc, |
const Container & | c | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
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;
... };
std::optional< bool > helper::json::to_bool | ( | const rapidjson::Value & | value | ) |
std::optional< bool > helper::json::to_bool | ( | const std::string & | value | ) |
Stream & helper::json::to_stream | ( | Stream & | stream, |
const rapidjson::Value & | v, | ||
const Value & | k_true, | ||
const Value & | k_false | ||
) |
std::string helper::json::to_string | ( | const MapObject & | map | ) |
std::string helper::json::to_string | ( | const RapidJson & | v | ) |
|
inline |
|
inline |