main RapidJSON namespace 更多...
类 | |
struct | ASCII |
ASCII encoding. 更多... | |
struct | AutoUTF |
Dynamically select encoding according to stream's runtime-specified UTF encoding type. 更多... | |
class | AutoUTFInputStream |
Input stream wrapper with dynamically bound encoding and automatic encoding detection. 更多... | |
class | AutoUTFOutputStream |
Output stream wrapper with dynamically bound encoding and automatic encoding detection. 更多... | |
struct | BaseReaderHandler |
Default implementation of Handler. 更多... | |
class | BasicIStreamWrapper |
Wrapper of std::basic_istream into RapidJSON's Stream concept. 更多... | |
class | BasicOStreamWrapper |
Wrapper of std::basic_ostream into RapidJSON's Stream concept. 更多... | |
class | CrtAllocator |
C-runtime library allocator. 更多... | |
class | EncodedInputStream |
Input byte stream wrapper with a statically bound encoding. 更多... | |
class | EncodedInputStream< UTF8<>, MemoryStream > |
Specialized for UTF8 MemoryStream. 更多... | |
class | EncodedOutputStream |
Output byte stream wrapper with statically bound encoding. 更多... | |
class | FileReadStream |
File byte stream for input using fread(). 更多... | |
class | FileWriteStream |
Wrapper of C file stream for input using fread(). 更多... | |
class | GenericArray |
Helper class for accessing Value of array type. 更多... | |
class | GenericDocument |
A document for parsing JSON text as DOM. 更多... | |
struct | GenericInsituStringStream |
A read-write string stream. 更多... | |
struct | GenericMember |
Name-value pair in a JSON object value. 更多... | |
class | GenericMemberIterator |
(Constant) member iterator for a JSON object value 更多... | |
struct | GenericMemoryBuffer |
Represents an in-memory output byte stream. 更多... | |
class | GenericObject |
Helper class for accessing Value of object type. 更多... | |
class | GenericPointer |
Represents a JSON Pointer. Use Pointer for UTF8 encoding and default allocator. 更多... | |
class | GenericReader |
SAX-style JSON parser. Use Reader for UTF8 encoding and default allocator. 更多... | |
class | GenericSchemaDocument |
JSON schema document. 更多... | |
class | GenericSchemaValidator |
JSON Schema Validator. 更多... | |
class | GenericStringBuffer |
Represents an in-memory output stream. 更多... | |
struct | GenericStringRef |
Reference to a constant string (not taking a copy) 更多... | |
struct | GenericStringStream |
Read-only string stream. 更多... | |
class | GenericValue |
Represents a JSON value. Use Value for UTF8 encoding and default allocator. 更多... | |
class | IGenericRemoteSchemaDocumentProvider |
class | MemoryPoolAllocator |
Default memory allocator used by the parser and DOM. 更多... | |
struct | MemoryStream |
Represents an in-memory input byte stream. 更多... | |
struct | ParseResult |
Result of parsing (wraps ParseErrorCode) 更多... | |
class | PrettyWriter |
Writer with indentation and spacing. 更多... | |
class | SchemaValidatingReader |
A helper class for parsing with validation. 更多... | |
struct | StreamTraits |
Provides additional information for stream. 更多... | |
struct | StreamTraits< GenericInsituStringStream< Encoding > > |
struct | StreamTraits< GenericStringStream< Encoding > > |
struct | Transcoder |
Encoding conversion. 更多... | |
struct | Transcoder< Encoding, Encoding > |
Specialization of Transcoder with same source and target encoding. 更多... | |
struct | UTF16 |
UTF-16 encoding. 更多... | |
struct | UTF16BE |
UTF-16 big endian encoding. 更多... | |
struct | UTF16LE |
UTF-16 little endian encoding. 更多... | |
struct | UTF32 |
UTF-32 encoding. 更多... | |
struct | UTF32BE |
UTF-32 big endian encoding. 更多... | |
struct | UTF32LE |
UTF-32 little endian enocoding. 更多... | |
struct | UTF8 |
UTF-8 encoding. 更多... | |
class | Writer |
JSON writer 更多... | |
函数 | |
template<typename CharType > | |
GenericStringRef< CharType > | StringRef (const CharType *str) |
Mark a character pointer as constant string | |
template<typename CharType > | |
GenericStringRef< CharType > | StringRef (const CharType *str, size_t length) |
Mark a character pointer as constant string | |
template<typename Stream > | |
void | PutUnsafe (Stream &stream, typename Stream::Ch c) |
Write character to a stream, presuming buffer is reserved. | |
const RAPIDJSON_ERROR_CHARTYPE * | GetParseError_En (ParseErrorCode parseErrorCode) |
Maps error code of parsing into error message. | |
template<> | |
void | PutN (FileWriteStream &stream, char c, size_t n) |
Implement specialized version of PutN() with memset() for better performance. | |
template<> | |
void | PutN (MemoryBuffer &memoryBuffer, char c, size_t n) |
Implement specialized version of PutN() with memset() for better performance. | |
template<typename InputStream > | |
void | SkipWhitespace (InputStream &is) |
Skip the JSON white spaces in a stream. | |
const char * | SkipWhitespace (const char *p, const char *end) |
template<> | |
void | SkipWhitespace (InsituStringStream &is) |
Template function specialization for InsituStringStream | |
template<> | |
void | SkipWhitespace (StringStream &is) |
Template function specialization for StringStream | |
template<> | |
void | SkipWhitespace (EncodedInputStream< UTF8<>, MemoryStream > &is) |
template<typename Stream > | |
void | PutReserve (Stream &stream, size_t count) |
Reserve n characters for writing to a stream. | |
template<typename Stream , typename Ch > | |
void | PutN (Stream &stream, Ch c, size_t n) |
Put N copies of a character to a stream. | |
template<typename Encoding , typename Allocator > | |
void | PutReserve (GenericStringBuffer< Encoding, Allocator > &stream, size_t count) |
template<typename Encoding , typename Allocator > | |
void | PutUnsafe (GenericStringBuffer< Encoding, Allocator > &stream, typename Encoding::Ch c) |
template<> | |
void | PutN (GenericStringBuffer< UTF8<> > &stream, char c, size_t n) |
Implement specialized version of PutN() with memset() for better performance. | |
Helper functions for GenericPointer | |
template<typename T > | |
T::ValueType & | CreateValueByPointer (T &root, const GenericPointer< typename T::ValueType > &pointer, typename T::AllocatorType &a) |
template<typename T , typename CharType , size_t N> | |
T::ValueType & | CreateValueByPointer (T &root, const CharType(&source)[N], typename T::AllocatorType &a) |
template<typename DocumentType > | |
DocumentType::ValueType & | CreateValueByPointer (DocumentType &document, const GenericPointer< typename DocumentType::ValueType > &pointer) |
template<typename DocumentType , typename CharType , size_t N> | |
DocumentType::ValueType & | CreateValueByPointer (DocumentType &document, const CharType(&source)[N]) |
template<typename T > | |
T::ValueType * | GetValueByPointer (T &root, const GenericPointer< typename T::ValueType > &pointer, size_t *unresolvedTokenIndex=0) |
template<typename T > | |
const T::ValueType * | GetValueByPointer (const T &root, const GenericPointer< typename T::ValueType > &pointer, size_t *unresolvedTokenIndex=0) |
template<typename T , typename CharType , size_t N> | |
T::ValueType * | GetValueByPointer (T &root, const CharType(&source)[N], size_t *unresolvedTokenIndex=0) |
template<typename T , typename CharType , size_t N> | |
const T::ValueType * | GetValueByPointer (const T &root, const CharType(&source)[N], size_t *unresolvedTokenIndex=0) |
template<typename T > | |
T::ValueType & | GetValueByPointerWithDefault (T &root, const GenericPointer< typename T::ValueType > &pointer, const typename T::ValueType &defaultValue, typename T::AllocatorType &a) |
template<typename T > | |
T::ValueType & | GetValueByPointerWithDefault (T &root, const GenericPointer< typename T::ValueType > &pointer, const typename T::Ch *defaultValue, typename T::AllocatorType &a) |
template<typename T , typename T2 > | |
T::ValueType & | GetValueByPointerWithDefault (T &root, const GenericPointer< typename T::ValueType > &pointer, T2 defaultValue, typename T::AllocatorType &a) |
template<typename T , typename CharType , size_t N> | |
T::ValueType & | GetValueByPointerWithDefault (T &root, const CharType(&source)[N], const typename T::ValueType &defaultValue, typename T::AllocatorType &a) |
template<typename T , typename CharType , size_t N> | |
T::ValueType & | GetValueByPointerWithDefault (T &root, const CharType(&source)[N], const typename T::Ch *defaultValue, typename T::AllocatorType &a) |
template<typename T , typename CharType , size_t N, typename T2 > | |
T::ValueType & | GetValueByPointerWithDefault (T &root, const CharType(&source)[N], T2 defaultValue, typename T::AllocatorType &a) |
template<typename DocumentType > | |
DocumentType::ValueType & | GetValueByPointerWithDefault (DocumentType &document, const GenericPointer< typename DocumentType::ValueType > &pointer, const typename DocumentType::ValueType &defaultValue) |
template<typename DocumentType > | |
DocumentType::ValueType & | GetValueByPointerWithDefault (DocumentType &document, const GenericPointer< typename DocumentType::ValueType > &pointer, const typename DocumentType::Ch *defaultValue) |
template<typename DocumentType , typename T2 > | |
DocumentType::ValueType & | GetValueByPointerWithDefault (DocumentType &document, const GenericPointer< typename DocumentType::ValueType > &pointer, T2 defaultValue) |
template<typename DocumentType , typename CharType , size_t N> | |
DocumentType::ValueType & | GetValueByPointerWithDefault (DocumentType &document, const CharType(&source)[N], const typename DocumentType::ValueType &defaultValue) |
template<typename DocumentType , typename CharType , size_t N> | |
DocumentType::ValueType & | GetValueByPointerWithDefault (DocumentType &document, const CharType(&source)[N], const typename DocumentType::Ch *defaultValue) |
template<typename DocumentType , typename CharType , size_t N, typename T2 > | |
DocumentType::ValueType & | GetValueByPointerWithDefault (DocumentType &document, const CharType(&source)[N], T2 defaultValue) |
template<typename T > | |
T::ValueType & | SetValueByPointer (T &root, const GenericPointer< typename T::ValueType > &pointer, typename T::ValueType &value, typename T::AllocatorType &a) |
template<typename T > | |
T::ValueType & | SetValueByPointer (T &root, const GenericPointer< typename T::ValueType > &pointer, const typename T::ValueType &value, typename T::AllocatorType &a) |
template<typename T > | |
T::ValueType & | SetValueByPointer (T &root, const GenericPointer< typename T::ValueType > &pointer, const typename T::Ch *value, typename T::AllocatorType &a) |
template<typename T , typename T2 > | |
T::ValueType & | SetValueByPointer (T &root, const GenericPointer< typename T::ValueType > &pointer, T2 value, typename T::AllocatorType &a) |
template<typename T , typename CharType , size_t N> | |
T::ValueType & | SetValueByPointer (T &root, const CharType(&source)[N], typename T::ValueType &value, typename T::AllocatorType &a) |
template<typename T , typename CharType , size_t N> | |
T::ValueType & | SetValueByPointer (T &root, const CharType(&source)[N], const typename T::ValueType &value, typename T::AllocatorType &a) |
template<typename T , typename CharType , size_t N> | |
T::ValueType & | SetValueByPointer (T &root, const CharType(&source)[N], const typename T::Ch *value, typename T::AllocatorType &a) |
template<typename T , typename CharType , size_t N, typename T2 > | |
T::ValueType & | SetValueByPointer (T &root, const CharType(&source)[N], T2 value, typename T::AllocatorType &a) |
template<typename DocumentType > | |
DocumentType::ValueType & | SetValueByPointer (DocumentType &document, const GenericPointer< typename DocumentType::ValueType > &pointer, typename DocumentType::ValueType &value) |
template<typename DocumentType > | |
DocumentType::ValueType & | SetValueByPointer (DocumentType &document, const GenericPointer< typename DocumentType::ValueType > &pointer, const typename DocumentType::ValueType &value) |
template<typename DocumentType > | |
DocumentType::ValueType & | SetValueByPointer (DocumentType &document, const GenericPointer< typename DocumentType::ValueType > &pointer, const typename DocumentType::Ch *value) |
template<typename DocumentType , typename T2 > | |
DocumentType::ValueType & | SetValueByPointer (DocumentType &document, const GenericPointer< typename DocumentType::ValueType > &pointer, T2 value) |
template<typename DocumentType , typename CharType , size_t N> | |
DocumentType::ValueType & | SetValueByPointer (DocumentType &document, const CharType(&source)[N], typename DocumentType::ValueType &value) |
template<typename DocumentType , typename CharType , size_t N> | |
DocumentType::ValueType & | SetValueByPointer (DocumentType &document, const CharType(&source)[N], const typename DocumentType::ValueType &value) |
template<typename DocumentType , typename CharType , size_t N> | |
DocumentType::ValueType & | SetValueByPointer (DocumentType &document, const CharType(&source)[N], const typename DocumentType::Ch *value) |
template<typename DocumentType , typename CharType , size_t N, typename T2 > | |
DocumentType::ValueType & | SetValueByPointer (DocumentType &document, const CharType(&source)[N], T2 value) |
template<typename T > | |
T::ValueType & | SwapValueByPointer (T &root, const GenericPointer< typename T::ValueType > &pointer, typename T::ValueType &value, typename T::AllocatorType &a) |
template<typename T , typename CharType , size_t N> | |
T::ValueType & | SwapValueByPointer (T &root, const CharType(&source)[N], typename T::ValueType &value, typename T::AllocatorType &a) |
template<typename DocumentType > | |
DocumentType::ValueType & | SwapValueByPointer (DocumentType &document, const GenericPointer< typename DocumentType::ValueType > &pointer, typename DocumentType::ValueType &value) |
template<typename DocumentType , typename CharType , size_t N> | |
DocumentType::ValueType & | SwapValueByPointer (DocumentType &document, const CharType(&source)[N], typename DocumentType::ValueType &value) |
template<typename T > | |
bool | EraseValueByPointer (T &root, const GenericPointer< typename T::ValueType > &pointer) |
template<typename T , typename CharType , size_t N> | |
bool | EraseValueByPointer (T &root, const CharType(&source)[N]) |
main RapidJSON namespace
Size type (for string lengths, array sizes, etc.)
RapidJSON uses 32-bit array/string indices even on 64-bit platforms, instead of using size_t
. Users may override the SizeType by defining RAPIDJSON_NO_SIZETYPEDEFINE.
Combination of parseFlags
Combination of PrettyWriter format flags.
枚举值 | |
---|---|
kFormatDefault | Default pretty formatting. |
kFormatSingleLineArray | Format arrays on a single line. |
void rapidjson::SkipWhitespace | ( | InputStream & | is | ) |
Skip the JSON white spaces in a stream.
is | A input stream for skipping white spaces. |
Mark a character pointer as constant string
Mark a plain character pointer as a "string literal". This function can be used to avoid copying a character string to be referenced as a value in a JSON GenericValue object, if the string's lifetime is known to be valid long enough.
CharType | Character type of the string |
str | Constant string, lifetime assumed to be longer than the use of the string in e.g. a GenericValue |
|
inline |
Mark a character pointer as constant string
Mark a plain character pointer as a "string literal". This function can be used to avoid copying a character string to be referenced as a value in a JSON GenericValue object, if the string's lifetime is known to be valid long enough.
This version has better performance with supplied length, and also supports string containing null characters.
CharType | character type of the string |
str | Constant string, lifetime assumed to be longer than the use of the string in e.g. a GenericValue |
length | The length of source string. |