#include "allocators.h"
#include "stream.h"
#include "encodedstream.h"
#include "internal/meta.h"
#include "internal/stack.h"
#include "internal/strtod.h"
#include <limits>
#include "error/error.h"
Go to the source code of this file.
|
enum | ParseFlag {
kParseNoFlags = 0
, kParseInsituFlag = 1
, kParseValidateEncodingFlag = 2
, kParseIterativeFlag = 4
,
kParseStopWhenDoneFlag = 8
, kParseFullPrecisionFlag = 16
, kParseCommentsFlag = 32
, kParseNumbersAsStringsFlag = 64
,
kParseTrailingCommasFlag = 128
, kParseNanAndInfFlag = 256
, kParseDefaultFlags = RAPIDJSON_PARSE_DEFAULT_FLAGS
} |
| Combination of parseFlags. More...
|
|
|
template<typename InputStream > |
void | SkipWhitespace (InputStream &is) |
| Skip the JSON white spaces in a stream.
|
|
const char * | SkipWhitespace (const char *p, const char *end) |
|
◆ RAPIDJSON_PARSE_DEFAULT_FLAGS
◆ Reader
◆ ParseFlag
- 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.
|
kParseDefaultFlags | Default parse flags. Can be customized by defining RAPIDJSON_PARSE_DEFAULT_FLAGS.
|
Definition at line 145 of file reader.h.
145 {
157};
#define RAPIDJSON_PARSE_DEFAULT_FLAGS
@ kParseFullPrecisionFlag
Parse number in full precision (but slower).
@ kParseInsituFlag
In-situ(destructive) parsing.
@ kParseNoFlags
No flags are set.
@ kParseCommentsFlag
Allow one-line (//) and multi-line (/**/) comments.
@ kParseDefaultFlags
Default parse flags. Can be customized by defining RAPIDJSON_PARSE_DEFAULT_FLAGS.
@ kParseTrailingCommasFlag
Allow trailing commas at the end of objects and arrays.
@ kParseNanAndInfFlag
Allow parsing NaN, Inf, Infinity, -Inf and -Infinity as doubles.
@ kParseValidateEncodingFlag
Validate encoding of JSON strings.
@ kParseNumbersAsStringsFlag
Parse all numbers (ints/doubles) as 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....
◆ SkipWhitespace() [1/2]
const char * SkipWhitespace |
( |
const char * | p, |
|
|
const char * | end ) |
|
inline |
Definition at line 273 of file reader.h.
273 {
274 while (
p != end && (*
p ==
' ' || *
p ==
'\n' || *
p ==
'\r' || *
p ==
'\t'))
277}
◆ SkipWhitespace() [2/2]
template<typename InputStream >
void SkipWhitespace |
( |
InputStream & | is | ) |
|
- Parameters
-
is | A input stream for skipping white spaces. |
- Note
- This function has SSE2/SSE4.2 specialization.
Definition at line 264 of file reader.h.
264 {
266 InputStream&
s(
copy.s);
267
268 typename InputStream::Ch c;
269 while ((c =
s.Peek()) ==
' ' || c ==
'\n' || c ==
'\r' || c ==
'\t')
271}
void copy(const path &from, const path &to)