@@ -74,7 +74,7 @@ class JSON_API Reader {
74
74
* error occurred.
75
75
*/
76
76
bool
77
- parse (const std::string& document, Value & root, bool collectComments = true );
77
+ parse (const std::string& document, _Value & root, bool collectComments = true );
78
78
79
79
/* * \brief Read a Value from a <a HREF="http://www.json.org">JSON</a>
80
80
document.
@@ -96,12 +96,12 @@ class JSON_API Reader {
96
96
*/
97
97
bool parse (const char * beginDoc,
98
98
const char * endDoc,
99
- Value & root,
99
+ _Value & root,
100
100
bool collectComments = true );
101
101
102
102
// / \brief Parse from input stream.
103
103
// / \see Json::operator>>(std::istream&, Json::Value&).
104
- bool parse (std::istream& is, Value & root, bool collectComments = true );
104
+ bool parse (std::istream& is, _Value & root, bool collectComments = true );
105
105
106
106
/* * \brief Returns a user friendly string that list errors in the parsed
107
107
* document.
@@ -140,7 +140,7 @@ class JSON_API Reader {
140
140
* \return \c true if the error was successfully added, \c false if the
141
141
* Value offset exceeds the document size.
142
142
*/
143
- bool pushError (const Value & value, const std::string& message);
143
+ bool pushError (const _Value & value, const std::string& message);
144
144
145
145
/* * \brief Add a semantic error message with extra context.
146
146
* \param value JSON Value location associated with the error
@@ -149,7 +149,7 @@ class JSON_API Reader {
149
149
* \return \c true if the error was successfully added, \c false if either
150
150
* Value offset exceeds the document size.
151
151
*/
152
- bool pushError (const Value & value, const std::string& message, const Value & extra);
152
+ bool pushError (const _Value & value, const std::string& message, const _Value & extra);
153
153
154
154
/* * \brief Return whether there are any errors.
155
155
* \return \c true if there are no errors to report \c false if
@@ -203,11 +203,11 @@ class JSON_API Reader {
203
203
bool readObject (Token& token);
204
204
bool readArray (Token& token);
205
205
bool decodeNumber (Token& token);
206
- bool decodeNumber (Token& token, Value & decoded);
206
+ bool decodeNumber (Token& token, _Value & decoded);
207
207
bool decodeString (Token& token);
208
208
bool decodeString (Token& token, std::string& decoded);
209
209
bool decodeDouble (Token& token);
210
- bool decodeDouble (Token& token, Value & decoded);
210
+ bool decodeDouble (Token& token, _Value & decoded);
211
211
bool decodeUnicodeCodePoint (Token& token,
212
212
Location& current,
213
213
Location end,
@@ -222,23 +222,23 @@ class JSON_API Reader {
222
222
Token& token,
223
223
TokenType skipUntilToken);
224
224
void skipUntilSpace ();
225
- Value & currentValue ();
225
+ _Value & currentValue ();
226
226
Char getNextChar ();
227
227
void
228
228
getLocationLineAndColumn (Location location, int & line, int & column) const ;
229
229
std::string getLocationLineAndColumn (Location location) const ;
230
230
void addComment (Location begin, Location end, CommentPlacement placement);
231
231
void skipCommentTokens (Token& token);
232
232
233
- typedef std::stack<Value *> Nodes;
233
+ typedef std::stack<_Value *> Nodes;
234
234
Nodes nodes_;
235
235
Errors errors_;
236
236
std::string document_;
237
237
Location begin_;
238
238
Location end_;
239
239
Location current_;
240
240
Location lastValueEnd_;
241
- Value * lastValue_;
241
+ _Value * lastValue_;
242
242
std::string commentsBefore_;
243
243
Features features_;
244
244
bool collectComments_;
@@ -269,7 +269,7 @@ class JSON_API CharReader {
269
269
*/
270
270
virtual bool parse (
271
271
char const * beginDoc, char const * endDoc,
272
- Value * root, std::string* errs) = 0;
272
+ _Value * root, std::string* errs) = 0;
273
273
274
274
class JSON_API Factory {
275
275
public:
@@ -294,7 +294,7 @@ class JSON_API CharReader {
294
294
\endcode
295
295
*/
296
296
template <class _Value >
297
- class JSON_API CharReaderBuilder : public CharReader::Factory {
297
+ class JSON_API CharReaderBuilder : public CharReader<_Value> ::Factory {
298
298
public:
299
299
// Note: We use a Json::Value so that we can add data-members to this class
300
300
// without a major version bump.
@@ -334,34 +334,34 @@ class JSON_API CharReaderBuilder : public CharReader::Factory {
334
334
JSON Value.
335
335
\sa setDefaults()
336
336
*/
337
- Json::Value settings_;
337
+ _Value settings_;
338
338
339
339
CharReaderBuilder ();
340
340
~CharReaderBuilder () override ;
341
341
342
- CharReader* newCharReader () const override ;
342
+ CharReader<_Value> * newCharReader () const override ;
343
343
344
344
/* * \return true if 'settings' are legal and consistent;
345
345
* otherwise, indicate bad settings via 'invalid'.
346
346
*/
347
- bool validate (Json::Value * invalid) const ;
347
+ bool validate (_Value * invalid) const ;
348
348
349
349
/* * A simple way to update a specific setting.
350
350
*/
351
- Value & operator [](std::string key);
351
+ _Value & operator [](std::string key);
352
352
353
353
/* * Called by ctor, but you can use this to reset settings_.
354
354
* \pre 'settings' != NULL (but Json::null is fine)
355
355
* \remark Defaults:
356
356
* \snippet src/lib_json/json_reader.cpp CharReaderBuilderDefaults
357
357
*/
358
- static void setDefaults (Json::Value * settings);
358
+ static void setDefaults (_Value * settings);
359
359
/* * Same as old Features::strictMode().
360
360
* \pre 'settings' != NULL (but Json::null is fine)
361
361
* \remark Defaults:
362
362
* \snippet src/lib_json/json_reader.cpp CharReaderBuilderStrictMode
363
363
*/
364
- static void strictMode (Json::Value * settings);
364
+ static void strictMode (_Value * settings);
365
365
};
366
366
367
367
/* * Consume entire stream and use its begin/end.
@@ -370,9 +370,9 @@ class JSON_API CharReaderBuilder : public CharReader::Factory {
370
370
*/
371
371
template <class _Value >
372
372
bool JSON_API parseFromStream (
373
- CharReader::Factory const &,
373
+ typename CharReader<_Value> ::Factory const &,
374
374
std::istream&,
375
- Value * root, std::string* errs);
375
+ _Value * root, std::string* errs);
376
376
377
377
/* * \brief Read from 'sin' into 'root'.
378
378
@@ -399,7 +399,7 @@ bool JSON_API parseFromStream(
399
399
\see Json::operator<<()
400
400
*/
401
401
template <class _Value >
402
- JSON_API std::istream& operator >>(std::istream&, Value &);
402
+ JSON_API std::istream& operator >>(std::istream&, _Value &);
403
403
404
404
} // namespace detail
405
405
0 commit comments