@@ -49,7 +49,7 @@ SOFTWARE.
49
49
50
50
#pragma once
51
51
52
- #include < json2cpp/constexpr_json .hpp>
52
+ #include < json2cpp/json2cpp .hpp>
53
53
#include < string>
54
54
55
55
#include < utility>
@@ -96,7 +96,7 @@ namespace adapters {
96
96
* Note that this constructor will throw an exception if the value is not
97
97
* an array.
98
98
*/
99
- explicit json2cppJsonArray (const constexpr_json ::json &value) : m_value(value)
99
+ explicit json2cppJsonArray (const json2cpp ::json &value) : m_value(value)
100
100
{
101
101
if (!value.is_array ()) { throwRuntimeError (" Value is not an array." ); }
102
102
}
@@ -126,14 +126,14 @@ namespace adapters {
126
126
*
127
127
* Note that the value returned by this function is a singleton.
128
128
*/
129
- static const constexpr_json ::json &emptyArray ()
129
+ static const json2cpp ::json &emptyArray ()
130
130
{
131
- static const constexpr_json ::json array = constexpr_json ::json::array ();
131
+ static const json2cpp ::json array = json2cpp ::json::array ();
132
132
return array;
133
133
}
134
134
135
135
// / Reference to the contained value
136
- const constexpr_json ::json &m_value;
136
+ const json2cpp ::json &m_value;
137
137
};
138
138
139
139
/* *
@@ -165,7 +165,7 @@ namespace adapters {
165
165
* Note that this constructor will throw an exception if the value is not
166
166
* an object.
167
167
*/
168
- explicit json2cppJsonObject (const constexpr_json ::json &value) : m_value(value)
168
+ explicit json2cppJsonObject (const json2cpp ::json &value) : m_value(value)
169
169
{
170
170
if (!value.is_object ()) { throwRuntimeError (" Value is not an object." ); }
171
171
}
@@ -207,14 +207,14 @@ namespace adapters {
207
207
*
208
208
* Note that the value returned by this function is a singleton.
209
209
*/
210
- static const constexpr_json ::json &emptyObject ()
210
+ static const json2cpp ::json &emptyObject ()
211
211
{
212
- static const constexpr_json ::json object = constexpr_json ::json::object ();
212
+ static const json2cpp ::json object = json2cpp ::json::object ();
213
213
return object;
214
214
}
215
215
216
216
// / Reference to the contained object
217
- const constexpr_json ::json &m_value;
217
+ const json2cpp ::json &m_value;
218
218
};
219
219
220
220
@@ -235,15 +235,15 @@ namespace adapters {
235
235
*
236
236
* @param source the json2cppJson value to be copied
237
237
*/
238
- explicit json2cppJsonFrozenValue (constexpr_json ::json source) : m_value(std::move(source)) {}
238
+ explicit json2cppJsonFrozenValue (json2cpp ::json source) : m_value(std::move(source)) {}
239
239
240
240
FrozenValue *clone () const override { return new json2cppJsonFrozenValue (m_value); }
241
241
242
242
bool equalTo (const Adapter &other, bool strict) const override ;
243
243
244
244
private:
245
245
// / Stored json2cppJson value
246
- constexpr_json ::json m_value;
246
+ json2cpp ::json m_value;
247
247
};
248
248
249
249
@@ -268,7 +268,7 @@ namespace adapters {
268
268
json2cppJsonValue () : m_value(emptyObject()) {}
269
269
270
270
// / Construct a wrapper for a specific json2cppJson value
271
- explicit json2cppJsonValue (const constexpr_json ::json &value) : m_value(value) {}
271
+ explicit json2cppJsonValue (const json2cpp ::json &value) : m_value(value) {}
272
272
273
273
/* *
274
274
* @brief Create a new json2cppJsonFrozenValue instance that contains the
@@ -413,14 +413,14 @@ namespace adapters {
413
413
414
414
private:
415
415
// / Return a reference to an empty object singleton
416
- static const constexpr_json ::json &emptyObject ()
416
+ static const json2cpp ::json &emptyObject ()
417
417
{
418
- static const constexpr_json ::json object = constexpr_json ::json::object ();
418
+ static const json2cpp ::json object = json2cpp ::json::object ();
419
419
return object;
420
420
}
421
421
422
422
// / Reference to the contained json2cppJson value.
423
- const constexpr_json ::json &m_value;
423
+ const json2cpp ::json &m_value;
424
424
};
425
425
426
426
/* *
@@ -444,7 +444,7 @@ namespace adapters {
444
444
json2cppJsonAdapter () : BasicAdapter() {}
445
445
446
446
// / Construct a json2cppJsonAdapter containing a specific json2cpp Json object
447
- explicit json2cppJsonAdapter (const constexpr_json ::json &value) : BasicAdapter(json2cppJsonValue{ value }) {}
447
+ explicit json2cppJsonAdapter (const json2cpp ::json &value) : BasicAdapter(json2cppJsonValue{ value }) {}
448
448
};
449
449
450
450
/* *
@@ -471,7 +471,7 @@ namespace adapters {
471
471
*
472
472
* @param itr json2cppJson iterator to store
473
473
*/
474
- explicit json2cppJsonArrayValueIterator (const constexpr_json ::json::const_iterator &itr) : m_itr(itr) {}
474
+ explicit json2cppJsonArrayValueIterator (const json2cpp ::json::const_iterator &itr) : m_itr(itr) {}
475
475
476
476
// / Returns a json2cppJsonAdapter that contains the value of the current
477
477
// / element.
@@ -522,7 +522,7 @@ namespace adapters {
522
522
void advance (std::ptrdiff_t n) { m_itr += n; }
523
523
524
524
private:
525
- constexpr_json ::json::const_iterator m_itr;
525
+ json2cpp ::json::const_iterator m_itr;
526
526
};
527
527
528
528
@@ -550,7 +550,7 @@ namespace adapters {
550
550
*
551
551
* @param itr json2cppJson iterator to store
552
552
*/
553
- explicit json2cppJsonObjectMemberIterator (const constexpr_json ::json::const_iterator &itr) : m_itr(itr) {}
553
+ explicit json2cppJsonObjectMemberIterator (const json2cpp ::json::const_iterator &itr) : m_itr(itr) {}
554
554
555
555
/* *
556
556
* @brief Returns a json2cppJsonObjectMember that contains the key and value
@@ -601,13 +601,13 @@ namespace adapters {
601
601
602
602
private:
603
603
// / Iternal copy of the original json2cppJson iterator
604
- constexpr_json ::json::const_iterator m_itr;
604
+ json2cpp ::json::const_iterator m_itr;
605
605
};
606
606
607
607
// / Specialisation of the AdapterTraits template struct for json2cppJsonAdapter.
608
608
template <> struct AdapterTraits <valijson::adapters::json2cppJsonAdapter>
609
609
{
610
- typedef constexpr_json ::json DocumentType;
610
+ typedef json2cpp ::json DocumentType;
611
611
612
612
static std::string adapterName () { return " json2cppJsonAdapter" ; }
613
613
};
0 commit comments