rapidjson Namespace Reference

main RapidJSON namespace More...

Classes

struct  ASCII
 ASCII encoding. More...
 
struct  AutoUTF
 Dynamically select encoding according to stream's runtime-specified UTF encoding type. More...
 
class  AutoUTFInputStream
 Input stream wrapper with dynamically bound encoding and automatic encoding detection. More...
 
class  AutoUTFOutputStream
 Output stream wrapper with dynamically bound encoding and automatic encoding detection. More...
 
struct  BaseReaderHandler
 Default implementation of Handler. More...
 
class  BasicIStreamWrapper
 Wrapper of std::basic_istream into RapidJSON's Stream concept. More...
 
class  BasicOStreamWrapper
 Wrapper of std::basic_ostream into RapidJSON's Stream concept. More...
 
class  CrtAllocator
 C-runtime library allocator. More...
 
class  CursorStreamWrapper
 Cursor stream wrapper for counting line and column number if error exists. More...
 
class  EncodedInputStream
 Input byte stream wrapper with a statically bound encoding. More...
 
class  EncodedInputStream< UTF8<>, MemoryStream >
 Specialized for UTF8 MemoryStream. More...
 
class  EncodedOutputStream
 Output byte stream wrapper with statically bound encoding. More...
 
class  FileReadStream
 File byte stream for input using fread(). More...
 
class  FileWriteStream
 Wrapper of C file stream for output using fwrite(). More...
 
class  GenericArray
 Helper class for accessing Value of array type. More...
 
class  GenericDocument
 A document for parsing JSON text as DOM. More...
 
struct  GenericInsituStringStream
 A read-write string stream. More...
 
class  GenericMember
 Name-value pair in a JSON object value. More...
 
class  GenericMemberIterator
 (Constant) member iterator for a JSON object value More...
 
struct  GenericMemoryBuffer
 Represents an in-memory output byte stream. More...
 
class  GenericObject
 Helper class for accessing Value of object type. More...
 
class  GenericPointer
 Represents a JSON Pointer. Use Pointer for UTF8 encoding and default allocator. More...
 
class  GenericReader
 SAX-style JSON parser. Use Reader for UTF8 encoding and default allocator. More...
 
class  GenericSchemaDocument
 JSON schema document. More...
 
class  GenericSchemaValidator
 JSON Schema Validator. More...
 
class  GenericStreamWrapper
 A Stream Wrapper. More...
 
class  GenericStringBuffer
 Represents an in-memory output stream. More...
 
struct  GenericStringRef
 Reference to a constant string (not taking a copy) More...
 
struct  GenericStringStream
 Read-only string stream. More...
 
class  GenericValue
 Represents a JSON value. Use Value for UTF8 encoding and default allocator. More...
 
class  IGenericRemoteSchemaDocumentProvider
 
class  MemoryPoolAllocator
 Default memory allocator used by the parser and DOM. More...
 
struct  MemoryStream
 Represents an in-memory input byte stream. More...
 
struct  ParseResult
 Result of parsing (wraps ParseErrorCode) More...
 
class  PrettyWriter
 Writer with indentation and spacing. More...
 
class  SchemaValidatingReader
 A helper class for parsing with validation. More...
 
class  StdAllocator
 
class  StdAllocator< void, BaseAllocator >
 
struct  StreamTraits
 Provides additional information for stream. More...
 
struct  StreamTraits< GenericInsituStringStream< Encoding > >
 
struct  StreamTraits< GenericStringStream< Encoding > >
 
struct  Transcoder
 Encoding conversion. More...
 
struct  Transcoder< Encoding, Encoding >
 Specialization of Transcoder with same source and target encoding. More...
 
struct  UTF16
 UTF-16 encoding. More...
 
struct  UTF16BE
 UTF-16 big endian encoding. More...
 
struct  UTF16LE
 UTF-16 little endian encoding. More...
 
struct  UTF32
 UTF-32 encoding. More...
 
struct  UTF32BE
 UTF-32 big endian encoding. More...
 
struct  UTF32LE
 UTF-32 little endian enocoding. More...
 
struct  UTF8
 UTF-8 encoding. More...
 
class  Writer
 JSON writer. More...
 

Typedefs

typedef unsigned SizeType
 Size type (for string lengths, array sizes, etc.) More...
 
typedef GenericValue< UTF8<> > Value
 GenericValue with UTF8 encoding.
 
typedef GenericDocument< UTF8<> > Document
 GenericDocument with UTF8 encoding.
 
typedef GenericStringStream< UTF8< char > > StringStream
 String stream with UTF8 encoding.
 
typedef GenericInsituStringStream< UTF8< char > > InsituStringStream
 Insitu string stream with UTF8 encoding.
 
typedef GenericStringBuffer< UTF8< char >, CrtAllocatorStringBuffer
 String buffer with UTF8 encoding.
 
typedef GenericMemoryBuffer< CrtAllocatorMemoryBuffer
 
typedef GenericReader< UTF8< char >, UTF8< char >, CrtAllocatorReader
 Reader with UTF8 encoding and default allocator.
 
typedef GenericPointer< Value, CrtAllocatorPointer
 GenericPointer for Value (UTF-8, default allocator).
 
typedef GenericSchemaDocument< Value, CrtAllocatorSchemaDocument
 GenericSchemaDocument using Value type.
 
typedef IGenericRemoteSchemaDocumentProvider< SchemaDocumentIRemoteSchemaDocumentProvider
 IGenericRemoteSchemaDocumentProvider using SchemaDocument.
 
typedef GenericSchemaValidator< SchemaDocument, BaseReaderHandler< UTF8< char >, void >, CrtAllocatorSchemaValidator
 
typedef BasicIStreamWrapper< std::istream > IStreamWrapper
 
typedef BasicIStreamWrapper< std::wistream > WIStreamWrapper
 
typedef BasicOStreamWrapper< std::ostream > OStreamWrapper
 
typedef BasicOStreamWrapper< std::wostream > WOStreamWrapper
 

Enumerations

enum  Type {
  kNullType = 0, kFalseType = 1, kTrueType = 2, kObjectType = 3,
  kArrayType = 4, kStringType = 5, kNumberType = 6
}
 Type of JSON value. More...
 
enum  UTFType {
  kUTF8 = 0, kUTF16LE = 1, kUTF16BE = 2, kUTF32LE = 3,
  kUTF32BE = 4
}
 Runtime-specified UTF encoding type of a stream. More...
 
enum  ParseErrorCode {
  kParseErrorNone = 0, kParseErrorDocumentEmpty, kParseErrorDocumentRootNotSingular, kParseErrorValueInvalid,
  kParseErrorObjectMissName, kParseErrorObjectMissColon, kParseErrorObjectMissCommaOrCurlyBracket, kParseErrorArrayMissCommaOrSquareBracket,
  kParseErrorStringUnicodeEscapeInvalidHex, kParseErrorStringUnicodeSurrogateInvalid, kParseErrorStringEscapeInvalid, kParseErrorStringMissQuotationMark,
  kParseErrorStringInvalidEncoding, kParseErrorNumberTooBig, kParseErrorNumberMissFraction, kParseErrorNumberMissExponent,
  kParseErrorTermination, kParseErrorUnspecificSyntaxError
}
 Error code of parsing. More...
 
enum  ValidateErrorCode {
  kValidateErrors = -1, kValidateErrorNone = 0, kValidateErrorMultipleOf, kValidateErrorMaximum,
  kValidateErrorExclusiveMaximum, kValidateErrorMinimum, kValidateErrorExclusiveMinimum, kValidateErrorMaxLength,
  kValidateErrorMinLength, kValidateErrorPattern, kValidateErrorMaxItems, kValidateErrorMinItems,
  kValidateErrorUniqueItems, kValidateErrorAdditionalItems, kValidateErrorMaxProperties, kValidateErrorMinProperties,
  kValidateErrorRequired, kValidateErrorAdditionalProperties, kValidateErrorPatternProperties, kValidateErrorDependencies,
  kValidateErrorEnum, kValidateErrorType, kValidateErrorOneOf, kValidateErrorOneOfMatch,
  kValidateErrorAllOf, kValidateErrorAnyOf, kValidateErrorNot
}
 Error codes when validating. More...
 
enum  PointerParseErrorCode {
  kPointerParseErrorNone = 0, kPointerParseErrorTokenMustBeginWithSolidus, kPointerParseErrorInvalidEscape, kPointerParseErrorInvalidPercentEncoding,
  kPointerParseErrorCharacterMustPercentEncode
}
 Error code of parsing. More...
 
enum  PrettyFormatOptions { kFormatDefault = 0, kFormatSingleLineArray = 1 }
 Combination of PrettyWriter format flags. More...
 
enum  ParseFlag {
  kParseNoFlags = 0, kParseInsituFlag = 1, kParseValidateEncodingFlag = 2, kParseIterativeFlag = 4,
  kParseStopWhenDoneFlag = 8, kParseFullPrecisionFlag = 16, kParseCommentsFlag = 32, kParseNumbersAsStringsFlag = 64,
  kParseTrailingCommasFlag = 128, kParseNanAndInfFlag = 256, kParseEscapedApostropheFlag = 512, kParseDefaultFlags = RAPIDJSON_PARSE_DEFAULT_FLAGS
}
 Combination of parseFlags. More...
 
enum  ValidateFlag { kValidateNoFlags = 0, kValidateContinueOnErrorFlag = 1, kValidateDefaultFlags = RAPIDJSON_VALIDATE_DEFAULT_FLAGS }
 Combination of validate flags. More...
 
enum  WriteFlag { kWriteNoFlags = 0, kWriteValidateEncodingFlag = 1, kWriteNanAndInfFlag = 2, kWriteDefaultFlags = RAPIDJSON_WRITE_DEFAULT_FLAGS }
 Combination of writeFlags. More...
 

Functions

template<typename T , typename A >
T * Realloc (A &a, T *old_p, size_t old_n, size_t new_n)
 
template<typename T , typename A >
T * Malloc (A &a, size_t n=1)
 
template<typename T , typename A >
void Free (A &a, T *p, size_t n=1)
 
template<typename CharType >
GenericStringRef< CharType > StringRef (const CharType *str)
 Mark a character pointer as constant string. More...
 
template<typename CharType >
GenericStringRef< CharType > StringRef (const CharType *str, size_t length)
 Mark a character pointer as constant string. More...
 
template<typename CharType >
GenericStringRef< CharType > StringRef (const std::basic_string< CharType > &str)
 Mark a string object as constant string. More...
 
template<typename Stream >
void PutUnsafe (Stream &stream, typename Stream::Ch c)
 Write character to a stream, presuming buffer is reserved.
 
const RAPIDJSON_ERROR_CHARTYPEGetParseError_En (ParseErrorCode parseErrorCode)
 Maps error code of parsing into error message. More...
 
const RAPIDJSON_ERROR_CHARTYPEGetValidateError_En (ValidateErrorCode validateErrorCode)
 Maps error code of validation into error message. More...
 
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. More...
 
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.
 

Variables

const typedef RAPIDJSON_ERROR_CHARTYPE *(* GetParseErrorFunc )(ParseErrorCode)
 Function pointer type of GetParseError(). More...
 
const typedef RAPIDJSON_ERROR_CHARTYPE *(* GetValidateErrorFunc )(ValidateErrorCode)
 Function pointer type of GetValidateError(). More...
 

Helper functions for GenericPointer

const GenericPointer< typename T::ValueType > & pointer
 
const GenericPointer< typename T::ValueType > T2 defaultValue
 
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
 
const CharType(& source )[N]
 
const GenericPointer< typename T::ValueType > T2 value
 
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 >
T::ValueType & GetValueByPointerWithDefault (T &root, const GenericPointer< typename T::ValueType > &pointer, const std::basic_string< typename T::Ch > &defaultValue, typename T::AllocatorType &a)
 
template<typename T , typename T2 >
 RAPIDJSON_DISABLEIF_RETURN ((internal::OrExpr< internal::IsPointer< T2 >, internal::IsGenericValue< T2 > >),(typename T::ValueType &)) GetValueByPointerWithDefault(T &root
 
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>
T::ValueType & GetValueByPointerWithDefault (T &root, const CharType(&source)[N], const std::basic_string< typename T::Ch > &defaultValue, typename T::AllocatorType &a)
 
template<typename T , typename CharType , size_t N, typename T2 >
 RAPIDJSON_DISABLEIF_RETURN ((internal::OrExpr< internal::IsPointer< T2 >, internal::IsGenericValue< T2 > >),(typename T::ValueType &)) GetValueByPointerWithDefault(T &root
 
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 >
DocumentType::ValueType & GetValueByPointerWithDefault (DocumentType &document, const GenericPointer< typename DocumentType::ValueType > &pointer, const std::basic_string< typename DocumentType::Ch > &defaultValue)
 
template<typename DocumentType , typename T2 >
 RAPIDJSON_DISABLEIF_RETURN ((internal::OrExpr< internal::IsPointer< T2 >, internal::IsGenericValue< T2 > >),(typename DocumentType::ValueType &)) GetValueByPointerWithDefault(DocumentType &document
 
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>
DocumentType::ValueType & GetValueByPointerWithDefault (DocumentType &document, const CharType(&source)[N], const std::basic_string< typename DocumentType::Ch > &defaultValue)
 
template<typename DocumentType , typename CharType , size_t N, typename T2 >
 RAPIDJSON_DISABLEIF_RETURN ((internal::OrExpr< internal::IsPointer< T2 >, internal::IsGenericValue< T2 > >),(typename DocumentType::ValueType &)) GetValueByPointerWithDefault(DocumentType &document
 
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 >
T::ValueType & SetValueByPointer (T &root, const GenericPointer< typename T::ValueType > &pointer, const std::basic_string< typename T::Ch > &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>
T::ValueType & SetValueByPointer (T &root, const CharType(&source)[N], const std::basic_string< typename T::Ch > &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 >
DocumentType::ValueType & SetValueByPointer (DocumentType &document, const GenericPointer< typename DocumentType::ValueType > &pointer, const std::basic_string< typename DocumentType::Ch > &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>
DocumentType::ValueType & SetValueByPointer (DocumentType &document, const CharType(&source)[N], const std::basic_string< typename DocumentType::Ch > &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])
 

Detailed Description

main RapidJSON namespace

See also
RAPIDJSON_NAMESPACE

Typedef Documentation

◆ SizeType

typedef unsigned rapidjson::SizeType

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.

Enumeration Type Documentation

◆ ParseFlag

Combination of parseFlags.

See also
Reader::Parse, Document::Parse, Document::ParseInsitu, Document::ParseStream
Enumerator
kParseNoFlags 

No flags are set.

kParseInsituFlag 

In-situ(destructive) parsing.

kParseValidateEncodingFlag 

Validate encoding of JSON strings.

kParseIterativeFlag 

Iterative(constant complexity in terms of function call stack size) parsing.

kParseStopWhenDoneFlag 

After parsing a complete JSON root from stream, stop further processing the rest of stream. When this flag is used, parser will not generate kParseErrorDocumentRootNotSingular error.

kParseFullPrecisionFlag 

Parse number in full precision (but slower).

kParseCommentsFlag 

Allow one-line (//) and multi-line (/**‍/) comments.

kParseNumbersAsStringsFlag 

Parse all numbers (ints/doubles) as strings.

kParseTrailingCommasFlag 

Allow trailing commas at the end of objects and arrays.

kParseNanAndInfFlag 

Allow parsing NaN, Inf, Infinity, -Inf and -Infinity as doubles.

kParseEscapedApostropheFlag 

Allow escaped apostrophe in strings.

kParseDefaultFlags 

Default parse flags. Can be customized by defining RAPIDJSON_PARSE_DEFAULT_FLAGS.

◆ PrettyFormatOptions

Combination of PrettyWriter format flags.

See also
PrettyWriter::SetFormatOptions
Enumerator
kFormatDefault 

Default pretty formatting.

kFormatSingleLineArray 

Format arrays on a single line.

◆ Type

Type of JSON value.

Enumerator
kNullType 

null

kFalseType 

false

kTrueType 

true

kObjectType 

object

kArrayType 

array

kStringType 

string

kNumberType 

number

◆ UTFType

Runtime-specified UTF encoding type of a stream.

Enumerator
kUTF8 

UTF-8.

kUTF16LE 

UTF-16 little endian.

kUTF16BE 

UTF-16 big endian.

kUTF32LE 

UTF-32 little endian.

kUTF32BE 

UTF-32 big endian.

◆ ValidateFlag

Combination of validate flags.

See also
Enumerator
kValidateNoFlags 

No flags are set.

kValidateContinueOnErrorFlag 

Don't stop after first validation error.

kValidateDefaultFlags 

Default validate flags. Can be customized by defining RAPIDJSON_VALIDATE_DEFAULT_FLAGS.

◆ WriteFlag

Combination of writeFlags.

Enumerator
kWriteNoFlags 

No flags are set.

kWriteValidateEncodingFlag 

Validate encoding of JSON strings.

kWriteNanAndInfFlag 

Allow writing of Infinity, -Infinity and NaN.

kWriteDefaultFlags 

Default write flags. Can be customized by defining RAPIDJSON_WRITE_DEFAULT_FLAGS.

Function Documentation

◆ SkipWhitespace()

template<typename InputStream >
void rapidjson::SkipWhitespace ( InputStream &  is)

Skip the JSON white spaces in a stream.

Parameters
isA input stream for skipping white spaces.
Note
This function has SSE2/SSE4.2 specialization.

◆ StringRef() [1/3]

template<typename CharType >
GenericStringRef< CharType > StringRef ( const CharType *  str)
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.

Template Parameters
CharTypeCharacter type of the string
Parameters
strConstant string, lifetime assumed to be longer than the use of the string in e.g. a GenericValue
Returns
GenericStringRef string reference object
See also
GenericValue::GenericValue(StringRefType), GenericValue::operator=(StringRefType), GenericValue::SetString(StringRefType), GenericValue::PushBack(StringRefType, Allocator&), GenericValue::AddMember

◆ StringRef() [2/3]

template<typename CharType >
GenericStringRef< CharType > StringRef ( const CharType *  str,
size_t  length 
)
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.

Template Parameters
CharTypecharacter type of the string
Parameters
strConstant string, lifetime assumed to be longer than the use of the string in e.g. a GenericValue
lengthThe length of source string.
Returns
GenericStringRef string reference object

◆ StringRef() [3/3]

template<typename CharType >
GenericStringRef< CharType > StringRef ( const std::basic_string< CharType > &  str)
inline

Mark a string object as constant string.

Mark a string object (e.g. std::string) as a "string literal". This function can be used to avoid copying a string to be referenced as a value in a JSON GenericValue object, if the string's lifetime is known to be valid long enough.

Template Parameters
CharTypecharacter type of the string
Parameters
strConstant string, lifetime assumed to be longer than the use of the string in e.g. a GenericValue
Returns
GenericStringRef string reference object
Note
Requires the definition of the preprocessor symbol RAPIDJSON_HAS_STDSTRING.

Variable Documentation

◆ a

const GenericPointer< typename T::ValueType > T2 T::AllocatorType & rapidjson::a
Initial value:
{
return pointer.GetWithDefault(root, defaultValue, a)

◆ defaultValue

const GenericPointer< typename DocumentType::ValueType > T2 rapidjson::defaultValue
Initial value:
{
return pointer.GetWithDefault(document, defaultValue)

◆ value

const GenericPointer< typename DocumentType::ValueType > T2 rapidjson::value
Initial value:
{
return pointer.Set(document, value)