@@ -54,12 +54,12 @@ namespace Json {
54
54
*/
55
55
class JSON_API Exception : public std::exception {
56
56
public:
57
- Exception (JSONCPP_STRING msg);
57
+ Exception (String msg);
58
58
~Exception () JSONCPP_NOEXCEPT override ;
59
59
char const * what () const JSONCPP_NOEXCEPT override ;
60
60
61
61
protected:
62
- JSONCPP_STRING msg_;
62
+ String msg_;
63
63
};
64
64
65
65
/* * Exceptions which the user cannot easily avoid.
@@ -70,7 +70,7 @@ class JSON_API Exception : public std::exception {
70
70
*/
71
71
class JSON_API RuntimeError : public Exception {
72
72
public:
73
- RuntimeError (JSONCPP_STRING const & msg);
73
+ RuntimeError (String const & msg);
74
74
};
75
75
76
76
/* * Exceptions thrown by JSON_ASSERT/JSON_FAIL macros.
@@ -81,13 +81,13 @@ class JSON_API RuntimeError : public Exception {
81
81
*/
82
82
class JSON_API LogicError : public Exception {
83
83
public:
84
- LogicError (JSONCPP_STRING const & msg);
84
+ LogicError (String const & msg);
85
85
};
86
86
87
87
// / used internally
88
- JSONCPP_NORETURN void throwRuntimeError (JSONCPP_STRING const & msg);
88
+ JSONCPP_NORETURN void throwRuntimeError (String const & msg);
89
89
// / used internally
90
- JSONCPP_NORETURN void throwLogicError (JSONCPP_STRING const & msg);
90
+ JSONCPP_NORETURN void throwLogicError (String const & msg);
91
91
92
92
/* * \brief Type of the value held by a Value object.
93
93
*/
@@ -186,7 +186,7 @@ class JSON_API Value {
186
186
friend class ValueIteratorBase ;
187
187
188
188
public:
189
- typedef std::vector<JSONCPP_STRING > Members;
189
+ typedef std::vector<String > Members;
190
190
typedef ValueIterator iterator;
191
191
typedef ValueConstIterator const_iterator;
192
192
typedef Json::UInt UInt;
@@ -332,8 +332,8 @@ Json::Value obj_value(Json::objectValue); // {}
332
332
* \endcode
333
333
*/
334
334
Value (const StaticString& value);
335
- Value (const JSONCPP_STRING & value); // /< Copy data() til size(). Embedded
336
- // /< zeroes too.
335
+ Value (const String & value); // /< Copy data() til size(). Embedded
336
+ // /< zeroes too.
337
337
#ifdef JSON_USE_CPPTL
338
338
Value (const CppTL::ConstString& value);
339
339
#endif
@@ -377,7 +377,7 @@ Json::Value obj_value(Json::objectValue); // {}
377
377
unsigned getCStringLength () const ; // Allows you to understand the length of
378
378
// the CString
379
379
#endif
380
- JSONCPP_STRING asString () const ; // /< Embedded zeroes are possible.
380
+ String asString () const ; // /< Embedded zeroes are possible.
381
381
/* * Get raw char* of string-value.
382
382
* \return false if !string. (Seg-fault if str or end are NULL.)
383
383
*/
@@ -484,11 +484,11 @@ Json::Value obj_value(Json::objectValue); // {}
484
484
const Value& operator [](const char * key) const ;
485
485
// / Access an object value by name, create a null member if it does not exist.
486
486
// / \param key may contain embedded nulls.
487
- Value& operator [](const JSONCPP_STRING & key);
487
+ Value& operator [](const String & key);
488
488
// / Access an object value by name, returns null if there is no member with
489
489
// / that name.
490
490
// / \param key may contain embedded nulls.
491
- const Value& operator [](const JSONCPP_STRING & key) const ;
491
+ const Value& operator [](const String & key) const ;
492
492
/* * \brief Access an object value by name, create a null member if it does not
493
493
exist.
494
494
@@ -521,7 +521,7 @@ Json::Value obj_value(Json::objectValue); // {}
521
521
// / Return the member named key if it exist, defaultValue otherwise.
522
522
// / \note deep copy
523
523
// / \param key may contain embedded nulls.
524
- Value get (const JSONCPP_STRING & key, const Value& defaultValue) const ;
524
+ Value get (const String & key, const Value& defaultValue) const ;
525
525
#ifdef JSON_USE_CPPTL
526
526
// / Return the member named key if it exist, defaultValue otherwise.
527
527
// / \note deep copy
@@ -543,7 +543,7 @@ Json::Value obj_value(Json::objectValue); // {}
543
543
void removeMember (const char * key);
544
544
// / Same as removeMember(const char*)
545
545
// / \param key may contain embedded nulls.
546
- void removeMember (const JSONCPP_STRING & key);
546
+ void removeMember (const String & key);
547
547
// / Same as removeMember(const char* begin, const char* end, Value* removed),
548
548
// / but 'key' is null-terminated.
549
549
bool removeMember (const char * key, Value* removed);
@@ -553,8 +553,8 @@ Json::Value obj_value(Json::objectValue); // {}
553
553
\param key may contain embedded nulls.
554
554
\return true iff removed (no exceptions)
555
555
*/
556
- bool removeMember (JSONCPP_STRING const & key, Value* removed);
557
- // / Same as removeMember(JSONCPP_STRING const& key, Value* removed)
556
+ bool removeMember (String const & key, Value* removed);
557
+ // / Same as removeMember(String const& key, Value* removed)
558
558
bool removeMember (const char * begin, const char * end, Value* removed);
559
559
/* * \brief Remove the indexed array element.
560
560
@@ -569,8 +569,8 @@ Json::Value obj_value(Json::objectValue); // {}
569
569
bool isMember (const char * key) const ;
570
570
// / Return true if the object has a member named key.
571
571
// / \param key may contain embedded nulls.
572
- bool isMember (const JSONCPP_STRING & key) const ;
573
- // / Same as isMember(JSONCPP_STRING const& key)const
572
+ bool isMember (const String & key) const ;
573
+ // / Same as isMember(String const& key)const
574
574
bool isMember (const char * begin, const char * end) const ;
575
575
#ifdef JSON_USE_CPPTL
576
576
// / Return true if the object has a member named key.
@@ -590,17 +590,17 @@ Json::Value obj_value(Json::objectValue); // {}
590
590
// # endif
591
591
592
592
// / \deprecated Always pass len.
593
- JSONCPP_DEPRECATED (" Use setComment(JSONCPP_STRING const&) instead." )
593
+ JSONCPP_DEPRECATED (" Use setComment(String const&) instead." )
594
594
void setComment (const char * comment, CommentPlacement placement);
595
595
// / Comments must be //... or /* ... */
596
596
void setComment (const char * comment, size_t len, CommentPlacement placement);
597
597
// / Comments must be //... or /* ... */
598
- void setComment (const JSONCPP_STRING & comment, CommentPlacement placement);
598
+ void setComment (const String & comment, CommentPlacement placement);
599
599
bool hasComment (CommentPlacement placement) const ;
600
600
// / Include delimiters and embedded newlines.
601
- JSONCPP_STRING getComment (CommentPlacement placement) const ;
601
+ String getComment (CommentPlacement placement) const ;
602
602
603
- JSONCPP_STRING toStyledString () const ;
603
+ String toStyledString () const ;
604
604
605
605
const_iterator begin () const ;
606
606
const_iterator end () const ;
@@ -673,11 +673,11 @@ class JSON_API PathArgument {
673
673
PathArgument ();
674
674
PathArgument (ArrayIndex index);
675
675
PathArgument (const char * key);
676
- PathArgument (const JSONCPP_STRING & key);
676
+ PathArgument (const String & key);
677
677
678
678
private:
679
679
enum Kind { kindNone = 0 , kindIndex, kindKey };
680
- JSONCPP_STRING key_;
680
+ String key_;
681
681
ArrayIndex index_{};
682
682
Kind kind_{ kindNone };
683
683
};
@@ -695,7 +695,7 @@ class JSON_API PathArgument {
695
695
*/
696
696
class JSON_API Path {
697
697
public:
698
- Path (const JSONCPP_STRING & path,
698
+ Path (const String & path,
699
699
const PathArgument& a1 = PathArgument(),
700
700
const PathArgument& a2 = PathArgument(),
701
701
const PathArgument& a3 = PathArgument(),
@@ -712,12 +712,12 @@ class JSON_API Path {
712
712
typedef std::vector<const PathArgument*> InArgs;
713
713
typedef std::vector<PathArgument> Args;
714
714
715
- void makePath (const JSONCPP_STRING & path, const InArgs& in);
716
- void addPathInArg (const JSONCPP_STRING & path,
715
+ void makePath (const String & path, const InArgs& in);
716
+ void addPathInArg (const String & path,
717
717
const InArgs& in,
718
718
InArgs::const_iterator& itInArg,
719
719
PathArgument::Kind kind);
720
- static void invalidPath (const JSONCPP_STRING & path, int location);
720
+ static void invalidPath (const String & path, int location);
721
721
722
722
Args args_;
723
723
};
@@ -751,7 +751,7 @@ class JSON_API ValueIteratorBase {
751
751
// / Return the member name of the referenced Value, or "" if it is not an
752
752
// / objectValue.
753
753
// / \note Avoid `c_str()` on result, as embedded zeroes are possible.
754
- JSONCPP_STRING name () const ;
754
+ String name () const ;
755
755
756
756
// / Return the member name of the referenced Value. "" if it is not an
757
757
// / objectValue.
0 commit comments