|
join 1.0
lightweight network framework library
|
JSON reader class. More...
#include <json.hpp>
Public Member Functions | |
| BasicJsonReader ()=default | |
| default constructor. | |
| BasicJsonReader (const BasicJsonReader &other)=delete | |
| copy constructor. | |
| BasicJsonReader & | operator= (const BasicJsonReader &other)=delete |
| copy assignment. | |
| BasicJsonReader (BasicJsonReader &&other)=delete | |
| move constructor. | |
| BasicJsonReader & | operator= (BasicJsonReader &&other)=delete |
| move assignment. | |
| ~BasicJsonReader ()=default | |
| destroy instance. | |
| template<typename Handler > | |
| int | deserialize (const char *document, size_t length, Handler &handler) |
| deserialize a document. | |
| template<typename Handler > | |
| int | deserialize (const char *first, const char *last, Handler &handler) |
| deserialize a document. | |
| template<typename Handler > | |
| int | deserialize (std::string_view document, Handler &handler) |
| deserialize a document. | |
| template<typename Handler > | |
| int | deserialize (std::stringstream &document, Handler &handler) |
| deserialize a document. | |
| template<typename Handler > | |
| int | deserialize (std::istringstream &document, Handler &handler) |
| deserialize a document. | |
| template<typename Handler > | |
| int | deserialize (std::fstream &document, Handler &handler) |
| deserialize a document. | |
| template<typename Handler > | |
| int | deserialize (std::ifstream &document, Handler &handler) |
| deserialize a document. | |
| template<typename Handler > | |
| int | deserialize (std::iostream &document, Handler &handler) |
| deserialize a document. | |
| template<typename Handler > | |
| int | deserialize (std::istream &document, Handler &handler) |
| deserialize a document. | |
Protected Member Functions | |
| template<typename ProbeType > | |
| int | read (ProbeType &document, Value &value) |
| parse a document into a value. | |
| template<typename ProbeType , typename Handler > | |
| int | read (ProbeType &document, Handler &&handler) |
| parse a document, resetting the handler on failure. | |
| template<typename ProbeType , typename Handler > | |
| int | readDocument (ProbeType &document, Handler &handler) |
| parse a document. | |
| template<typename ProbeType , typename Handler > | |
| int | readValue (ProbeType &document, Handler &handler, size_t depth) |
| parse a JSON value. | |
| template<typename ProbeType , typename Handler > | |
| int | readNull (ProbeType &document, Handler &handler) |
| parse a null value. | |
| template<typename ProbeType , typename Handler > | |
| int | readTrue (ProbeType &document, Handler &handler) |
| parse a true value. | |
| template<typename ProbeType , typename Handler > | |
| int | readFalse (ProbeType &document, Handler &handler) |
| parse a false value. | |
| template<typename ProbeType , typename Handler > | |
| int | readNumber (ProbeType &document, Handler &handler) |
| parse a number value. | |
| template<typename ProbeType > | |
| int | readHex (ProbeType &document, uint32_t &u) |
| parse a 4-digit hexadecimal sequence.. | |
| template<typename ProbeType > | |
| int | readUnicode (ProbeType &document, std::string &output) |
| parse unicode. | |
| template<typename ProbeType > | |
| int | readEscaped (ProbeType &document, std::string &output) |
| parse escaped sequence. | |
| template<typename ProbeType , typename Handler > | |
| int | readString (ProbeType &document, Handler &handler, bool isKey=false) |
| parse a string value. | |
| template<typename ProbeType , typename Handler > | |
| JOIN_ALWAYS_INLINE int | readArray (ProbeType &document, Handler &handler, size_t depth) |
| parse an array value. | |
| template<typename ProbeType , typename Handler > | |
| JOIN_ALWAYS_INLINE int | readObject (ProbeType &document, Handler &handler, size_t depth) |
| parse an object value. | |
| std::string_view | readUntilEscaped (dconv::StringProbe &document) noexcept |
| read characters until escaped. | |
| void | readUntilEscaped (dconv::StringProbe &document, std::string &out) noexcept |
| read characters until escaped. | |
| void | readUntilEscaped (dconv::StreamProbe &document, std::string &out) noexcept |
| read characters until escaped. | |
| int | skipWhitespaces (dconv::StringProbe &document) noexcept |
| skip whitespaces, and comments when comment parsing is enabled. | |
| int | skipWhitespaces (dconv::StreamProbe &document) noexcept |
| skip whitespaces, and comments when comment parsing is enabled. | |
| int | skipWhitespacesAndComments (dconv::StringProbe &document) noexcept |
| skip whitespaces and comments. | |
| int | skipWhitespacesAndComments (dconv::StreamProbe &document) noexcept |
| skip whitespaces and comments. | |
| int | validateChunk (std::string_view chunk) noexcept |
| validate the encoding of the last chunk read, when encoding validation is enabled. | |
| constexpr bool | isUpperAlpha (char c) noexcept |
| check if upper case alphanumeric character. | |
| constexpr bool | isLowerAlpha (char c) noexcept |
| check if lower case alphanumeric character. | |
| constexpr bool | isDigit (char c) noexcept |
| check if digit. | |
JSON reader class.
|
default |
default constructor.
|
delete |
copy constructor.
| other | object to copy. |
|
delete |
move constructor.
| other | object to move. |
|
default |
destroy instance.
|
inline |
deserialize a document.
| document | document to parse. |
| length | The length of the document to parse. |
| handler | handler receiving the document. |
|
inline |
deserialize a document.
| first | The first character of the document to parse. |
| last | The last character of the document to parse. |
| handler | handler receiving the document. |
|
inline |
deserialize a document.
| document | document to deserialize. |
| handler | handler receiving the document. |
|
inline |
deserialize a document.
| document | document to deserialize. |
| handler | handler receiving the document. |
|
inline |
deserialize a document.
| document | document to deserialize. |
| handler | handler receiving the document. |
|
inline |
deserialize a document.
| document | document to deserialize. |
| handler | handler receiving the document. |
|
inline |
deserialize a document.
| document | document to deserialize. |
| handler | handler receiving the document. |
|
inline |
deserialize a document.
| document | document to parse. |
| handler | handler receiving the document. |
|
inline |
deserialize a document.
| document | document to deserialize. |
| handler | handler receiving the document. |
|
inlineconstexprprotectednoexcept |
check if digit.
| c | character to check. |
|
inlineconstexprprotectednoexcept |
check if lower case alphanumeric character.
| c | character to check. |
|
inlineconstexprprotectednoexcept |
check if upper case alphanumeric character.
| c | character to check. |
|
delete |
move assignment.
| other | object to move. |
|
delete |
copy assignment.
| other | object to copy. |
|
inlineprotected |
parse a document, resetting the handler on failure.
| document | document to parse. |
| handler | handler receiving the document. |
|
inlineprotected |
parse a document into a value.
| document | document to parse. |
| value | value receiving the document. |
|
inlineprotected |
parse an array value.
| document | document to parse. |
| handler | handler receiving the document. |
| depth | number of enclosing containers. |
|
inlineprotected |
parse a document.
| document | document to parse. |
| handler | handler receiving the document. |
|
inlineprotected |
parse escaped sequence.
| document | document to parse. |
| output | parse output string. |
|
inlineprotected |
parse a false value.
| document | document to parse. |
| handler | handler receiving the document. |
|
inlineprotected |
parse a 4-digit hexadecimal sequence..
| document | document to parse. |
| u | output variable to store the parsed hexadecimal value. |
|
inlineprotected |
parse a null value.
| document | document to parse. |
| handler | handler receiving the document. |
|
inlineprotected |
parse a number value.
| document | document to parse. |
| handler | handler receiving the document. |
|
inlineprotected |
parse an object value.
| document | document to parse. |
| handler | handler receiving the document. |
| depth | number of enclosing containers. |
|
inlineprotected |
parse a string value.
| document | document to parse. |
| handler | handler receiving the document. |
| isKey | indicate whether the element to parse is a key or not. |
|
inlineprotected |
parse a true value.
| document | document to parse. |
| handler | handler receiving the document. |
|
inlineprotected |
parse unicode.
| document | document to parse. |
| output | parse output string. |
|
inlineprotectednoexcept |
read characters until escaped.
| document | document to parse. |
| out | output buffer. |
|
inlineprotectednoexcept |
read characters until escaped.
| document | document to parse. |
|
inlineprotectednoexcept |
read characters until escaped.
| document | document to parse. |
| out | output buffer. |
|
inlineprotected |
parse a JSON value.
| document | document to parse. |
| handler | handler receiving the document. |
| depth | number of enclosing containers. |
|
inlineprotectednoexcept |
skip whitespaces, and comments when comment parsing is enabled.
| document | document to parse. |
|
inlineprotectednoexcept |
skip whitespaces, and comments when comment parsing is enabled.
| document | document to parse. |
|
inlineprotectednoexcept |
skip whitespaces and comments.
| document | document to parse. |
|
inlineprotectednoexcept |
skip whitespaces and comments.
| document | document to parse. |
|
inlineprotectednoexcept |
validate the encoding of the last chunk read, when encoding validation is enabled.
| chunk | last chunk read. |