33#include <rapidjson/reader.h>
101 std::string *error_message,
114 const rapidjson::Reader &reader);
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:64
size_t m_depth
The current depth of the document.
Definition: json_syntax_check.h:75
bool EndObject(rapidjson::SizeType)
Definition: json_syntax_check.cc:43
bool m_too_deep_error_raised
Definition: json_syntax_check.h:77
JsonDocumentDepthHandler m_depth_handler
Pointer to a function that should handle error occurred when depth is exceeded.
Definition: json_syntax_check.h:80
Syntax_check_handler(JsonDocumentDepthHandler m_depth_handler)
Definition: json_syntax_check.cc:57
bool too_deep_error_raised() const
Definition: json_syntax_check.h:71
bool StartArray()
Definition: json_syntax_check.cc:48
bool StartObject()
Definition: json_syntax_check.cc:38
bool EndArray(rapidjson::SizeType)
Definition: json_syntax_check.cc:53
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4365
std::function< void()> JsonDocumentDepthHandler
Definition: json_error_handler.h:31
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:94
bool check_json_depth(size_t depth, const JsonDocumentDepthHandler &handler)
Check if the depth of a JSON document exceeds the maximum supported depth (JSON_DOCUMENT_MAX_DEPTH).
Definition: json_syntax_check.cc:86
bool is_valid_json_syntax(const char *text, size_t length, size_t *error_offset, std::string *error_message, const JsonDocumentDepthHandler &depth_handler)
Check if a string is a valid JSON.
Definition: json_syntax_check.cc:61
Define rapidjson::SizeType to be std::size_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:75
typedef::std::size_t SizeType
Definition: my_rapidjson_size_t.h:38