|
join 1.0
lightweight network framework library
|
JSON reader class. More...
#include <json.hpp>


Public Member Functions | |
| JsonReader (Value &root) | |
| default constructor. | |
| JsonReader (const JsonReader &other)=delete | |
| copy constructor. | |
| JsonReader & | operator= (const JsonReader &other)=delete |
| copy assignment. | |
| JsonReader (JsonReader &&other)=delete | |
| move constructor. | |
| JsonReader & | operator= (JsonReader &&other)=delete |
| move assignment. | |
| virtual | ~JsonReader ()=default |
| destroy instance. | |
| template<JsonReadMode ReadMode = JsonReadMode::None> | |
| int | deserialize (const char *document, size_t length) |
| deserialize a document. | |
| int | deserialize (const char *document, size_t length) override |
| deserialize a document. | |
| template<JsonReadMode ReadMode = JsonReadMode::None> | |
| int | deserialize (const char *first, const char *last) |
| deserialize a document. | |
| int | deserialize (const char *first, const char *last) override |
| deserialize a document. | |
| template<JsonReadMode ReadMode = JsonReadMode::None> | |
| int | deserialize (const std::string &document) |
| deserialize a document. | |
| int | deserialize (const std::string &document) override |
| deserialize a document. | |
| template<JsonReadMode ReadMode = JsonReadMode::None> | |
| int | deserialize (std::stringstream &document) |
| deserialize a document. | |
| int | deserialize (std::stringstream &document) override |
| deserialize a document. | |
| template<JsonReadMode ReadMode = JsonReadMode::None> | |
| int | deserialize (std::istringstream &document) |
| deserialize a document. | |
| int | deserialize (std::istringstream &document) override |
| deserialize a document. | |
| template<JsonReadMode ReadMode = JsonReadMode::None> | |
| int | deserialize (std::fstream &document) |
| deserialize a document. | |
| int | deserialize (std::fstream &document) override |
| deserialize a document. | |
| template<JsonReadMode ReadMode = JsonReadMode::None> | |
| int | deserialize (std::ifstream &document) |
| deserialize a document. | |
| int | deserialize (std::ifstream &document) override |
| deserialize a document. | |
| template<JsonReadMode ReadMode = JsonReadMode::None> | |
| int | deserialize (std::iostream &document) |
| deserialize a document. | |
| int | deserialize (std::iostream &document) override |
| deserialize a document. | |
| template<JsonReadMode ReadMode = JsonReadMode::None> | |
| int | deserialize (std::istream &document) |
| deserialize a document. | |
| int | deserialize (std::istream &document) override |
| deserialize a document. | |
Public Member Functions inherited from join::StreamReader | |
| StreamReader (Value &root) | |
| default constructor. | |
| StreamReader (const StreamReader &other)=delete | |
| copy constructor. | |
| StreamReader & | operator= (const StreamReader &other)=delete |
| copy assignment. | |
| StreamReader (StreamReader &&other)=delete | |
| move constructor. | |
| StreamReader & | operator= (StreamReader &&other)=delete |
| move assignment. | |
| virtual | ~StreamReader ()=default |
| destroy instance. | |
Protected Member Functions | |
| template<JsonReadMode ReadMode, typename ViewType > | |
| int | read (ViewType &document) |
| parse a document. | |
| template<JsonReadMode ReadMode, typename ViewType > | |
| int | readValue (ViewType &document) |
| parse a JSON value. | |
| template<typename ViewType > | |
| int | readNull (ViewType &document) |
| parse a null value. | |
| template<typename ViewType > | |
| int | readTrue (ViewType &document) |
| parse a true value. | |
| template<typename ViewType > | |
| int | readFalse (ViewType &document) |
| parse a false value. | |
| template<typename ViewType > | |
| int | readInf (ViewType &document, bool negative) |
| parse an infinity value. | |
| template<typename ViewType > | |
| int | readNan (ViewType &document, bool negative) |
| parse a nan value. | |
| void | umul192 (uint64_t hi, uint64_t lo, uint64_t significand, uint64_t &high, uint64_t &middle, uint64_t &low) noexcept |
| multiply 192 bits unsigned integer by 64 bits unsigned integer. | |
| bool | strtodFast (uint64_t significand, int64_t exponent, double &value) |
| convert double using fast path. | |
| bool | strtodSlow (const std::string &num, double &d) |
| convert double using strtod. | |
| template<typename ViewType > | |
| int | readNumber (ViewType &document) |
| parse a number value. | |
| template<typename ViewType > | |
| int | readHex (ViewType &document, uint32_t &u) |
| parse a 4-digit hexadecimal sequence.. | |
| void | encodeUtf8 (uint32_t codepoint, std::string &output) |
| encode a Unicode codepoint to UTF-8. | |
| template<typename ViewType > | |
| int | readUnicode (ViewType &document, std::string &output) |
| parse unicode. | |
| template<typename ViewType > | |
| int | readEscaped (ViewType &document, std::string &output) |
| parse escaped sequence. | |
| template<typename ViewType > | |
| int | readString (ViewType &document, bool isKey=false) |
| parse UTF8. | |
| template<JsonReadMode ReadMode, typename ViewType > | |
| int | readArray (ViewType &document) |
| parse an array value. | |
| template<JsonReadMode ReadMode, typename ViewType > | |
| int | readObject (ViewType &document) |
| parse an object value. | |
| template<JsonReadMode ReadMode, typename ViewType > | |
| std::enable_if<!(ReadMode &JsonReadMode::ParseComments), int >::type | skipWhitespaces (ViewType &document) |
| skip whitespaces. | |
| template<JsonReadMode ReadMode, typename ViewType > | |
| std::enable_if<(ReadMode &JsonReadMode::ParseComments), int >::type | skipWhitespaces (ViewType &document) |
| skip whitespaces with comment parsing. | |
| 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. | |
| constexpr bool | isSign (char c) noexcept |
| check if sign. | |
Protected Member Functions inherited from join::StreamReader | |
| virtual int | setNull () override |
| set null value. | |
| virtual int | setBool (bool value) override |
| set boolean value. | |
| virtual int | setInt (int32_t value) override |
| set integer value. | |
| virtual int | setUint (uint32_t value) override |
| set unsigned integer value. | |
| virtual int | setInt64 (int64_t value) override |
| set 64 bits integer value. | |
| virtual int | setUint64 (uint64_t value) override |
| set unsigned 64 bits integer value. | |
| virtual int | setDouble (double value) override |
| set real value. | |
| virtual int | setString (const std::string &value) override |
| set string value. | |
| virtual int | startArray (uint32_t size=0) override |
| start array. | |
| virtual int | stopArray () override |
| stop array. | |
| virtual int | startObject (uint32_t size=0) override |
| start object. | |
| virtual int | setKey (const std::string &key) override |
| set key. | |
| virtual int | stopObject () override |
| stop object. | |
| virtual int | setValue (Value &&value) |
| set value. | |
Protected Member Functions inherited from join::SaxHandler | |
| SaxHandler ()=default | |
| default constructor. | |
| SaxHandler (const SaxHandler &other)=default | |
| copy constructor. | |
| SaxHandler & | operator= (const SaxHandler &other)=default |
| copy assignment. | |
| SaxHandler (SaxHandler &&other)=default | |
| move constructor. | |
| SaxHandler & | operator= (SaxHandler &&other)=default |
| move assignment. | |
| virtual | ~SaxHandler ()=default |
| destroy instance. | |
Additional Inherited Members | |
Protected Attributes inherited from join::StreamReader | |
| std::stack< Value * > | _stack |
| stack. | |
| std::string | _curkey |
| current key. | |
| Value & | _root |
| root. | |
Static Protected Attributes inherited from join::StreamReader | |
| static constexpr size_t | _maxdepth = 19 |
| max stack depth. | |
JSON reader class.
|
inline |
default constructor.
| root | Value to write. |
|
delete |
copy constructor.
| other | object to copy. |
|
delete |
move constructor.
| other | object to move. |
|
virtualdefault |
destroy instance.
|
inlinevirtual |
deserialize a document.
| document | document to parse. |
| length | The length of the document to parse. |
Implements join::StreamReader.
|
inlineoverridevirtual |
deserialize a document.
| document | document to parse. |
| length | The length of the document to parse. |
Implements join::StreamReader.
|
inlinevirtual |
deserialize a document.
| first | The first character of the document to parse. |
| last | The last character of the document to parse. |
Implements join::StreamReader.
|
inlineoverridevirtual |
deserialize a document.
| first | The first character of the document to parse. |
| last | The last character of the document to parse. |
Implements join::StreamReader.
|
inlinevirtual |
deserialize a document.
| document | document to deserialize. |
Implements join::StreamReader.
|
inlineoverridevirtual |
deserialize a document.
| document | document to deserialize. |
Implements join::StreamReader.
|
inlinevirtual |
deserialize a document.
| document | document to deserialize. |
Implements join::StreamReader.
|
inlineoverridevirtual |
deserialize a document.
| document | document to deserialize. |
Implements join::StreamReader.
|
inlinevirtual |
deserialize a document.
| document | document to deserialize. |
Implements join::StreamReader.
|
inlineoverridevirtual |
deserialize a document.
| document | document to deserialize. |
Implements join::StreamReader.
|
inlinevirtual |
deserialize a document.
| document | document to deserialize. |
Implements join::StreamReader.
|
inlineoverridevirtual |
deserialize a document.
| document | document to deserialize. |
Implements join::StreamReader.
|
inlinevirtual |
deserialize a document.
| document | document to deserialize. |
Implements join::StreamReader.
|
inlineoverridevirtual |
deserialize a document.
| document | document to deserialize. |
Implements join::StreamReader.
|
inlinevirtual |
deserialize a document.
| document | document to deserialize. |
Implements join::StreamReader.
|
inlineoverridevirtual |
deserialize a document.
| document | document to deserialize. |
Implements join::StreamReader.
|
inlinevirtual |
deserialize a document.
| document | document to deserialize. |
Implements join::StreamReader.
|
inlineoverridevirtual |
deserialize a document.
| document | document to deserialize. |
Implements join::StreamReader.
|
inlineprotected |
encode a Unicode codepoint to UTF-8.
| codepoint | unicode codepoint to encode. |
| output | parse output string. |
|
inlineconstexprprotectednoexcept |
check if digit.
| c | character to check. |
|
inlineconstexprprotectednoexcept |
check if lower case alphanumeric character.
| c | character to check. |
|
inlineconstexprprotectednoexcept |
check if sign.
| c | character to check. |
|
inlineconstexprprotectednoexcept |
check if upper case alphanumeric character.
| c | character to check. |
|
delete |
copy assignment.
| other | object to copy. |
|
delete |
move assignment.
| other | object to move. |
|
inlineprotected |
parse a document.
| document | document to parse. |
|
inlineprotected |
parse an array value.
| document | document to parse. |
|
inlineprotected |
parse escaped sequence.
| document | document to parse. |
| output | parse output string. |
|
inlineprotected |
parse a false value.
| document | document to parse. |
|
inlineprotected |
parse a 4-digit hexadecimal sequence..
| document | document to parse. |
| u | output variable to store the parsed hexadecimal value. |
|
inlineprotected |
parse an infinity value.
| document | document to parse. |
|
inlineprotected |
parse a nan value.
| document | document to parse. |
|
inlineprotected |
parse a null value.
| document | document to parse. |
|
inlineprotected |
parse a number value.
| document | document to parse. |
|
inlineprotected |
parse an object value.
| document | document to parse. |
|
inlineprotected |
parse UTF8.
| document | document to parse. |
| output | parse output string. |
parse a string value.
| document | document to parse. |
| isKey | indicate whether the string to parse is a key or not. |
|
inlineprotected |
parse a true value.
| document | document to parse. |
|
inlineprotected |
parse unicode.
| document | document to parse. |
| output | parse output string. |
|
inlineprotected |
parse a JSON value.
| document | document to parse. |
|
inlineprotected |
skip whitespaces.
| document | document to parse. |
|
inlineprotected |
skip whitespaces with comment parsing.
| document | document to parse. |
|
inlineprotected |
convert double using fast path.
| significand | significand digits. |
| exponent | exponent. |
| value | converted value. |
|
inlineprotected |
convert double using strtod.
| num | number to convert. |
| value | converted value. |
|
inlineprotectednoexcept |
multiply 192 bits unsigned integer by 64 bits unsigned integer.
| hi | high 64 bits of the 128-bit multiplicand. |
| lo | low 64 bits of the 128-bit multiplicand. |
| significand | 64-bit multiplier. |
| high | high 64 bits of the 192-bit result. |
| middle | middle 64 bits of the 192-bit result. |
| low | low 64 bits of the 192-bit result. |