37#include <rapidjson/encodings.h>
38#include <rapidjson/reader.h>
107 std::string *error_message,
120 const rapidjson::Reader &reader);
Error handler for the functions that serialize a JSON value in the JSON binary storage format.
Definition: json_error_handler.h:49
This class implements a handler for use with rapidjson::Reader when we want to check if a string is a...
Definition: json_syntax_check.h:70
size_t m_depth
The current depth of the document.
Definition: json_syntax_check.h:81
JsonErrorHandler m_depth_handler
Pointer to a function that should handle error occurred when depth is exceeded.
Definition: json_syntax_check.h:86
bool EndObject(rapidjson::SizeType)
Definition: json_syntax_check.cc:42
bool m_too_deep_error_raised
Definition: json_syntax_check.h:83
bool too_deep_error_raised() const
Definition: json_syntax_check.h:77
bool StartArray()
Definition: json_syntax_check.cc:47
bool StartObject()
Definition: json_syntax_check.cc:37
bool EndArray(rapidjson::SizeType)
Definition: json_syntax_check.cc:52
Syntax_check_handler(JsonErrorHandler m_depth_handler)
Definition: json_syntax_check.cc:56
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4583
std::function< void()> JsonErrorHandler
Definition: json_error_handler.h:36
std::pair< std::string, size_t > get_error_from_reader(const rapidjson::Reader &reader)
Extract a readable error from a rapidjson reader and return it to the caller.
Definition: json_syntax_check.cc:97
bool is_valid_json_syntax(const char *text, size_t length, size_t *error_offset, std::string *error_message, const JsonErrorHandler &depth_handler)
Check if a string is a valid JSON.
Definition: json_syntax_check.cc:59
bool check_json_depth(size_t depth, const JsonErrorHandler &handler)
Check if the depth of a JSON document exceeds the maximum supported depth (JSON_DOCUMENT_MAX_DEPTH).
Definition: json_syntax_check.cc:84
Define rapidjson::SizeType to be std::uint64_t.
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
typedef::std::uint64_t SizeType
Definition: my_rapidjson_size_t.h:39