56 typedef const Char *Location;
78 bool parse(
const std::string &document,
80 bool collectComments =
true );
92 bool parse(
const char *beginDoc,
const char *endDoc,
94 bool collectComments =
true );
98 bool parse( std::istream &is,
100 bool collectComments =
true );
107 std::string getFormatedErrorMessages()
const;
112 tokenEndOfStream = 0,
123 tokenMemberSeparator,
140 std::string message_;
144 typedef std::deque<ErrorInfo> Errors;
146 bool expectToken( TokenType type,
Token &token,
const char *message );
147 bool readToken(
Token &token );
149 bool match( Location pattern,
152 bool readCStyleComment();
153 bool readCppStyleComment();
157 bool readObject(
Token &token );
158 bool readArray(
Token &token );
159 bool decodeNumber(
Token &token );
160 bool decodeString(
Token &token );
161 bool decodeString(
Token &token, std::string &decoded );
162 bool decodeDouble(
Token &token );
163 bool decodeUnicodeCodePoint(
Token &token,
166 unsigned int &unicode );
167 bool decodeUnicodeEscapeSequence(
Token &token,
170 unsigned int &unicode );
171 bool addError(
const std::string &message,
173 Location extra = 0 );
174 bool recoverFromError( TokenType skipUntilToken );
175 bool addErrorAndRecover(
const std::string &message,
177 TokenType skipUntilToken );
178 void skipUntilSpace();
179 Value ¤tValue();
181 void getLocationLineAndColumn( Location location,
184 std::string getLocationLineAndColumn( Location location )
const;
185 void addComment( Location begin,
188 void skipCommentTokens(
Token &token );
190 typedef std::stack<Value *> Nodes;
193 std::string document_;
197 Location lastValueEnd_;
199 std::string commentsBefore_;
201 bool collectComments_;
void parse(Session &, str_ref)
Configuration passed to reader and writer. This configuration object can be used to force the Reader ...
JSON (JavaScript Object Notation).
std::istream & operator>>(std::istream &sin, Value &root)
Read from 'sin' into 'root'.
Unserialize a JSON document into a Value.