|
Botcraft 1.21.10
|
Namespaces | |
| namespace | Internal |
Classes | |
| class | Array |
| Real class declaration, just a derived class of std::vector<Value> More... | |
| class | Object |
| Real class declaration, just a derived class of std::map<std::string, Value> More... | |
| class | Value |
| Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant directly so we can better control which constructors are allowed. More... | |
Functions | |
| Value | Parse (std::string_view::const_iterator iter, size_t length, bool no_except=false) |
| Parse a string_view from iter for at most length characters. | |
| Value | Parse (const std::string &s, bool no_except=false) |
| Parse a std::string. | |
| std::string | EscapeChars (const std::string &s) |
| void | SkipSpaces (std::string_view::const_iterator &iter, size_t &length) |
| Value | NumberFromString (const std::string &s, const bool is_scientific, const bool is_double) |
| Value | ParseNumber (std::string_view::const_iterator &iter, size_t &length) |
| Value | ParseString (std::string_view::const_iterator &iter, size_t &length) |
| Value | ParseObject (std::string_view::const_iterator &iter, size_t &length) |
| Value | ParseArray (std::string_view::const_iterator &iter, size_t &length) |
| Value | ParseValue (std::string_view::const_iterator &iter, size_t &length) |
| std::istream & | operator>> (std::istream &is, Value &v) |
| void | ValidateStringNumber (const std::string &s) |
| bool | IsValidCodepoint (const unsigned long cp) |
| std::string | CodepointToUtf8 (const std::string &hex_chars) |
| std::string ProtocolCraft::Json::CodepointToUtf8 | ( | const std::string & | hex_chars | ) |
Definition at line 647 of file Json.cpp.
References IsValidCodepoint().
Referenced by ParseString().
| std::string ProtocolCraft::Json::EscapeChars | ( | const std::string & | s | ) |
Definition at line 435 of file Json.cpp.
Referenced by ProtocolCraft::Json::Value::Dump().
| bool ProtocolCraft::Json::IsValidCodepoint | ( | const unsigned long | cp | ) |
Definition at line 641 of file Json.cpp.
Referenced by CodepointToUtf8().
| Value ProtocolCraft::Json::NumberFromString | ( | const std::string & | s, |
| const bool | is_scientific, | ||
| const bool | is_double | ||
| ) |
Definition at line 555 of file Json.cpp.
References ValidateStringNumber().
Referenced by ParseNumber().
| std::istream & ProtocolCraft::Json::operator>> | ( | std::istream & | is, |
| Value & | v | ||
| ) |
| Value ProtocolCraft::Json::Parse | ( | const std::string & | s, |
| bool | no_except = false |
||
| ) |
| Value ProtocolCraft::Json::Parse | ( | std::string_view::const_iterator | iter, |
| size_t | length, | ||
| bool | no_except = false |
||
| ) |
Parse a string_view from iter for at most length characters.
| iter | start character |
| length | available number of characters |
| no_except | if true, the function will return empty Value instead of throwing an exception in case of unvalid string |
Definition at line 390 of file Json.cpp.
References ParseValue().
Referenced by Parse(), ProtocolCraft::Chat::ReadImpl(), ProtocolCraft::ClientboundCustomPayloadConfigurationPacket::SerializeParsed(), ProtocolCraft::ServerboundCustomPayloadConfigurationPacket::SerializeParsed(), ProtocolCraft::ClientboundCustomPayloadPacket::SerializeParsed(), ProtocolCraft::ServerboundCustomPayloadPacket::SerializeParsed(), and Botcraft::Authentifier::WebRequest().
| Value ProtocolCraft::Json::ParseArray | ( | std::string_view::const_iterator & | iter, |
| size_t & | length | ||
| ) |
Definition at line 860 of file Json.cpp.
References ParseValue(), and SkipSpaces().
Referenced by ParseValue().
| Value ProtocolCraft::Json::ParseNumber | ( | std::string_view::const_iterator & | iter, |
| size_t & | length | ||
| ) |
| Value ProtocolCraft::Json::ParseObject | ( | std::string_view::const_iterator & | iter, |
| size_t & | length | ||
| ) |
Definition at line 792 of file Json.cpp.
References ProtocolCraft::Json::Value::get_string(), ParseString(), ParseValue(), and SkipSpaces().
Referenced by ParseValue().
| Value ProtocolCraft::Json::ParseString | ( | std::string_view::const_iterator & | iter, |
| size_t & | length | ||
| ) |
Definition at line 684 of file Json.cpp.
References CodepointToUtf8().
Referenced by ParseObject(), and ParseValue().
| Value ProtocolCraft::Json::ParseValue | ( | std::string_view::const_iterator & | iter, |
| size_t & | length | ||
| ) |
Definition at line 916 of file Json.cpp.
References ParseArray(), ParseNumber(), ParseObject(), ParseString(), and SkipSpaces().
Referenced by Parse(), ParseArray(), and ParseObject().
| void ProtocolCraft::Json::SkipSpaces | ( | std::string_view::const_iterator & | iter, |
| size_t & | length | ||
| ) |
Definition at line 478 of file Json.cpp.
Referenced by ParseArray(), ParseObject(), and ParseValue().
| void ProtocolCraft::Json::ValidateStringNumber | ( | const std::string & | s | ) |
Definition at line 498 of file Json.cpp.
Referenced by NumberFromString().