6 #if !defined(JSON_IS_AMALGAMATION) 10 #endif // if !defined(JSON_IS_AMALGAMATION) 17 #include <cpptl/conststring.h> 22 #define JSON_ASSERT_UNREACHABLE assert(false) 29 #if defined(__ARMEL__) 30 #define ALIGNAS(byte_alignment) __attribute__((aligned(byte_alignment))) 32 #define ALIGNAS(byte_alignment) 42 static Value const nullStatic;
54 #if defined(JSON_HAS_INT64) 62 #endif // defined(JSON_HAS_INT64) 67 #if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) 68 template <
typename T,
typename U>
69 static inline bool InRange(
double d, T min, U max) {
73 return d >= min && d <= max;
75 #else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) 76 static inline double integerToDouble(
Json::UInt64 value) {
77 return static_cast<double>(
Int64(value / 2)) * 2.0 + static_cast<double>(
Int64(value & 1));
80 template <
typename T>
static inline double integerToDouble(T value) {
81 return static_cast<double>(value);
84 template <
typename T,
typename U>
85 static inline bool InRange(
double d, T min, U max) {
86 return d >= integerToDouble(min) && d <= integerToDouble(max);
88 #endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) 102 if (length >= static_cast<size_t>(Value::maxInt))
103 length = Value::maxInt - 1;
105 char* newString =
static_cast<char*
>(malloc(length + 1));
106 if (newString == NULL) {
108 "in Json::Value::duplicateStringValue(): " 109 "Failed to allocate string value buffer");
111 memcpy(newString, value, length);
112 newString[length] = 0;
124 JSON_ASSERT_MESSAGE(length <= static_cast<unsigned>(Value::maxInt) -
sizeof(
unsigned) - 1U,
125 "in Json::Value::duplicateAndPrefixStringValue(): " 126 "length too big for prefixing");
127 unsigned actualLength = length +
static_cast<unsigned>(
sizeof(unsigned)) + 1U;
128 char* newString =
static_cast<char*
>(malloc(actualLength));
129 if (newString == 0) {
131 "in Json::Value::duplicateAndPrefixStringValue(): " 132 "Failed to allocate string value buffer");
134 *
reinterpret_cast<unsigned*
>(newString) = length;
135 memcpy(newString +
sizeof(
unsigned), value, length);
136 newString[actualLength - 1U] = 0;
140 bool isPrefixed,
char const* prefixed,
141 unsigned* length,
char const** value)
144 *length =
static_cast<unsigned>(strlen(prefixed));
147 *length = *
reinterpret_cast<unsigned const*
>(prefixed);
148 *value = prefixed +
sizeof(unsigned);
153 #if JSONCPP_USING_SECURE_MEMORY 156 char const* valueDecoded;
158 size_t const size =
sizeof(unsigned) + length + 1U;
159 memset(value, 0, size);
164 size_t size = (length==0) ? strlen(value) : length;
165 memset(value, 0, size);
168 #else // !JSONCPP_USING_SECURE_MEMORY 175 #endif // JSONCPP_USING_SECURE_MEMORY 186 #if !defined(JSON_IS_AMALGAMATION) 189 #endif // if !defined(JSON_IS_AMALGAMATION) 225 Value::CommentInfo::CommentInfo() : comment_(0)
228 Value::CommentInfo::~CommentInfo() {
233 void Value::CommentInfo::setComment(
const char* text,
size_t len) {
240 text[0] ==
'\0' || text[0] ==
'/',
241 "in Json::Value::setComment(): Comments must start with /");
257 Value::CZString::CZString(
ArrayIndex aindex) : cstr_(0), index_(aindex) {}
259 Value::CZString::CZString(
char const* str,
unsigned ulength, DuplicationPolicy allocate)
262 storage_.policy_ = allocate & 0x3;
263 storage_.length_ = ulength & 0x3FFFFFFF;
266 Value::CZString::CZString(
const CZString& other) {
267 cstr_ = (other.storage_.policy_ != noDuplication && other.cstr_ != 0
270 storage_.policy_ =
static_cast<unsigned>(other.cstr_
271 ? (
static_cast<DuplicationPolicy
>(other.storage_.policy_) == noDuplication
272 ? noDuplication : duplicate)
273 :
static_cast<DuplicationPolicy
>(other.storage_.policy_)) & 3U;
274 storage_.length_ = other.storage_.length_;
277 #if JSON_HAS_RVALUE_REFERENCES 278 Value::CZString::CZString(CZString&& other)
279 : cstr_(other.cstr_), index_(other.index_) {
280 other.cstr_ =
nullptr;
284 Value::CZString::~CZString() {
285 if (cstr_ && storage_.policy_ == duplicate) {
290 void Value::CZString::swap(CZString& other) {
291 std::swap(cstr_, other.cstr_);
292 std::swap(index_, other.index_);
295 Value::CZString& Value::CZString::operator=(CZString other) {
300 bool Value::CZString::operator<(
const CZString& other)
const {
301 if (!cstr_)
return index_ < other.index_;
304 unsigned this_len = this->storage_.length_;
305 unsigned other_len = other.storage_.length_;
306 unsigned min_len = std::min(this_len, other_len);
308 int comp = memcmp(this->cstr_, other.cstr_, min_len);
309 if (comp < 0)
return true;
310 if (comp > 0)
return false;
311 return (this_len < other_len);
315 if (!cstr_)
return index_ == other.index_;
318 unsigned this_len = this->storage_.length_;
319 unsigned other_len = other.storage_.length_;
320 if (this_len != other_len)
return false;
322 int comp = memcmp(this->cstr_, other.cstr_, this_len);
326 ArrayIndex Value::CZString::index()
const {
return index_; }
329 const char* Value::CZString::data()
const {
return cstr_; }
330 unsigned Value::CZString::length()
const {
return storage_.length_; }
331 bool Value::CZString::isStaticString()
const {
return storage_.policy_ == noDuplication; }
346 static char const empty[] =
"";
360 value_.string_ =
const_cast<char*
>(
static_cast<char const*
>(empty));
364 value_.map_ =
new ObjectValues();
367 value_.bool_ =
false;
381 value_.uint_ = value;
383 #if defined(JSON_HAS_INT64) 390 value_.uint_ = value;
392 #endif // defined(JSON_HAS_INT64) 396 value_.real_ = value;
418 value_.string_ =
const_cast<char*
>(value.
c_str());
421 #ifdef JSON_USE_CPPTL 430 value_.bool_ = value;
434 : type_(other.type_), allocated_(false)
436 comments_(0), start_(other.start_), limit_(other.limit_)
444 value_ = other.value_;
447 if (other.value_.string_ && other.allocated_) {
455 value_.string_ = other.value_.string_;
461 value_.map_ =
new ObjectValues(*other.value_.map_);
466 if (other.comments_) {
469 const CommentInfo& otherComment = other.comments_[comment];
470 if (otherComment.comment_)
471 comments_[comment].setComment(
472 otherComment.comment_, strlen(otherComment.comment_));
477 #if JSON_HAS_RVALUE_REFERENCES 519 std::swap(value_, other.value_);
520 int temp2 = allocated_;
521 allocated_ = other.allocated_;
522 other.allocated_ = temp2 & 0x1;
527 std::swap(comments_, other.comments_);
528 std::swap(start_, other.start_);
529 std::swap(limit_, other.limit_);
543 int typeDelta = type_ - other.type_;
545 return typeDelta < 0 ?
true :
false;
550 return value_.int_ < other.value_.int_;
552 return value_.uint_ < other.value_.uint_;
554 return value_.real_ < other.value_.real_;
556 return value_.bool_ < other.value_.bool_;
559 if ((value_.string_ == 0) || (other.value_.string_ == 0)) {
560 if (other.value_.string_)
return true;
565 char const* this_str;
566 char const* other_str;
569 unsigned min_len = std::min(this_len, other_len);
571 int comp = memcmp(this_str, other_str, min_len);
572 if (comp < 0)
return true;
573 if (comp > 0)
return false;
574 return (this_len < other_len);
578 int delta = int(value_.map_->size() - other.value_.map_->size());
581 return (*value_.map_) < (*other.value_.map_);
600 int temp = other.type_;
607 return value_.int_ == other.value_.int_;
609 return value_.uint_ == other.value_.uint_;
611 return value_.real_ == other.value_.real_;
613 return value_.bool_ == other.value_.bool_;
616 if ((value_.string_ == 0) || (other.value_.string_ == 0)) {
617 return (value_.string_ == other.value_.string_);
621 char const* this_str;
622 char const* other_str;
625 if (this_len != other_len)
return false;
627 int comp = memcmp(this_str, other_str, this_len);
632 return value_.map_->size() == other.value_.map_->size() &&
633 (*value_.map_) == (*other.value_.map_);
644 "in Json::Value::asCString(): requires stringValue");
645 if (value_.string_ == 0)
return 0;
647 char const* this_str;
652 #if JSONCPP_USING_SECURE_MEMORY 653 unsigned Value::getCStringLength()
const {
655 "in Json::Value::asCString(): requires stringValue");
656 if (value_.string_ == 0)
return 0;
658 char const* this_str;
666 if (value_.string_ == 0)
return false;
669 *cend = *str + length;
679 if (value_.string_ == 0)
return "";
681 char const* this_str;
686 return value_.bool_ ?
"true" :
"false";
698 #ifdef JSON_USE_CPPTL 699 CppTL::ConstString Value::asConstString()
const {
704 return CppTL::ConstString(str, len);
712 return Int(value_.int_);
715 return Int(value_.uint_);
718 "double out of Int range");
719 return Int(value_.real_);
723 return value_.bool_ ? 1 : 0;
734 return UInt(value_.int_);
737 return UInt(value_.uint_);
740 "double out of UInt range");
741 return UInt(value_.real_);
745 return value_.bool_ ? 1 : 0;
752 #if defined(JSON_HAS_INT64) 757 return Int64(value_.int_);
760 return Int64(value_.uint_);
763 "double out of Int64 range");
764 return Int64(value_.real_);
768 return value_.bool_ ? 1 : 0;
779 return UInt64(value_.int_);
781 return UInt64(value_.uint_);
784 "double out of UInt64 range");
785 return UInt64(value_.real_);
789 return value_.bool_ ? 1 : 0;
795 #endif // if defined(JSON_HAS_INT64) 798 #if defined(JSON_NO_INT64) 806 #if defined(JSON_NO_INT64) 816 return static_cast<double>(value_.int_);
818 #if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) 819 return static_cast<double>(value_.uint_);
820 #else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) 821 return integerToDouble(value_.uint_);
822 #endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) 828 return value_.bool_ ? 1.0 : 0.0;
838 return static_cast<float>(value_.int_);
840 #if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) 841 return static_cast<float>(value_.uint_);
842 #else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) 844 return static_cast<float>(integerToDouble(value_.uint_));
845 #endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) 847 return static_cast<float>(value_.real_);
851 return value_.bool_ ? 1.0f : 0.0f;
865 return value_.int_ ?
true :
false;
867 return value_.uint_ ?
true :
false;
870 return (value_.real_ != 0.0) ?
true :
false;
883 (type_ ==
arrayValue && value_.map_->size() == 0) ||
884 (type_ ==
objectValue && value_.map_->size() == 0) ||
921 if (!value_.map_->empty()) {
922 ObjectValues::const_iterator itLast = value_.map_->end();
924 return (*itLast).first.index() + 1;
946 "in Json::Value::clear(): requires complex value");
952 value_.map_->clear();
961 "in Json::Value::resize(): requires arrayValue");
967 else if (newSize > oldSize)
968 (*this)[newSize - 1];
970 for (
ArrayIndex index = newSize; index < oldSize; ++index) {
971 value_.map_->erase(index);
980 "in Json::Value::operator[](ArrayIndex): requires arrayValue");
984 ObjectValues::iterator it = value_.map_->lower_bound(key);
985 if (it != value_.map_->end() && (*it).first == key)
989 it = value_.map_->insert(it, defaultValue);
996 "in Json::Value::operator[](int index): index cannot be negative");
1003 "in Json::Value::operator[](ArrayIndex)const: requires arrayValue");
1006 CZString key(index);
1007 ObjectValues::const_iterator it = value_.map_->find(key);
1008 if (it == value_.map_->end())
1010 return (*it).second;
1016 "in Json::Value::operator[](int index) const: index cannot be negative");
1020 void Value::initBasic(
ValueType vtype,
bool allocated) {
1022 allocated_ = allocated;
1031 Value& Value::resolveReference(
const char* key) {
1034 "in Json::Value::resolveReference(): requires objectValue");
1038 key, static_cast<unsigned>(strlen(key)), CZString::noDuplication);
1039 ObjectValues::iterator it = value_.map_->lower_bound(actualKey);
1040 if (it != value_.map_->end() && (*it).first == actualKey)
1041 return (*it).second;
1043 ObjectValues::value_type defaultValue(actualKey,
nullSingleton());
1044 it = value_.map_->insert(it, defaultValue);
1045 Value& value = (*it).second;
1050 Value& Value::resolveReference(
char const* key,
char const* cend)
1054 "in Json::Value::resolveReference(key, end): requires objectValue");
1058 key, static_cast<unsigned>(cend-key), CZString::duplicateOnCopy);
1059 ObjectValues::iterator it = value_.map_->lower_bound(actualKey);
1060 if (it != value_.map_->end() && (*it).first == actualKey)
1061 return (*it).second;
1063 ObjectValues::value_type defaultValue(actualKey,
nullSingleton());
1064 it = value_.map_->insert(it, defaultValue);
1065 Value& value = (*it).second;
1070 const Value* value = &((*this)[index]);
1080 "in Json::Value::find(key, end, found): requires objectValue or nullValue");
1082 CZString actualKey(key, static_cast<unsigned>(cend-key), CZString::noDuplication);
1083 ObjectValues::const_iterator it = value_.map_->find(actualKey);
1084 if (it == value_.map_->end())
return NULL;
1085 return &(*it).second;
1089 Value const* found =
find(key, key + strlen(key));
1095 Value const* found =
find(key.data(), key.data() + key.length());
1101 return resolveReference(key, key + strlen(key));
1105 return resolveReference(key.data(), key.data() + key.length());
1109 return resolveReference(key.
c_str());
1112 #ifdef JSON_USE_CPPTL 1114 return resolveReference(key.c_str(), key.end_c_str());
1118 Value const* found =
find(key.c_str(), key.end_c_str());
1129 return !found ? defaultValue : *found;
1133 return get(key, key + strlen(key), defaultValue);
1137 return get(key.data(), key.data() + key.length(), defaultValue);
1146 CZString actualKey(key, static_cast<unsigned>(cend-key), CZString::noDuplication);
1147 ObjectValues::iterator it = value_.map_->find(actualKey);
1148 if (it == value_.map_->end())
1150 *removed = it->second;
1151 value_.map_->erase(it);
1160 return removeMember(key.data(), key.data() + key.length(), removed);
1165 "in Json::Value::removeMember(): requires objectValue");
1182 CZString key(index);
1183 ObjectValues::iterator it = value_.map_->find(key);
1184 if (it == value_.map_->end()) {
1187 *removed = it->second;
1190 for (
ArrayIndex i = index; i < (oldSize - 1); ++i){
1192 (*value_.map_)[keey] = (*
this)[i + 1];
1195 CZString keyLast(oldSize - 1);
1196 ObjectValues::iterator itLast = value_.map_->find(keyLast);
1197 value_.map_->erase(itLast);
1201 #ifdef JSON_USE_CPPTL 1203 const Value& defaultValue)
const {
1204 return get(key.c_str(), key.end_c_str(), defaultValue);
1211 return NULL != value;
1215 return isMember(key, key + strlen(key));
1219 return isMember(key.data(), key.data() + key.length());
1222 #ifdef JSON_USE_CPPTL 1224 return isMember(key.c_str(), key.end_c_str());
1231 "in Json::Value::getMemberNames(), value must be objectValue");
1235 members.reserve(value_.map_->size());
1236 ObjectValues::const_iterator it = value_.map_->begin();
1237 ObjectValues::const_iterator itEnd = value_.map_->end();
1238 for (; it != itEnd; ++it) {
1240 (*it).first.length()));
1271 double integral_part;
1272 return modf(d, &integral_part) == 0.0;
1286 return value_.real_ >=
minInt && value_.real_ <=
maxInt &&
1299 return value_.uint_ <=
maxUInt;
1301 return value_.real_ >= 0 && value_.real_ <=
maxUInt &&
1310 #if defined(JSON_HAS_INT64) 1320 return value_.real_ >= double(
minInt64) &&
1325 #endif // JSON_HAS_INT64 1330 #if defined(JSON_HAS_INT64) 1333 return value_.int_ >= 0;
1340 return value_.real_ >= 0 && value_.real_ < maxUInt64AsDouble &&
1345 #endif // JSON_HAS_INT64 1350 #if defined(JSON_HAS_INT64) 1370 if ((len > 0) && (comment[len-1] ==
'\n')) {
1374 comments_[placement].setComment(comment, len);
1378 setComment(comment, strlen(comment), placement);
1382 setComment(comment.c_str(), comment.length(), placement);
1386 return comments_ != 0 && comments_[placement].comment_ != 0;
1391 return comments_[placement].comment_;
1405 return writer.
write(*
this);
1439 return iterator(value_.map_->begin());
1452 return iterator(value_.map_->end());
1466 : key_(), index_(index), kind_(kindIndex) {}
1469 : key_(key), index_(), kind_(kindKey) {}
1472 : key_(key.c_str()), index_(), kind_(kindKey) {}
1492 void Path::makePath(
const JSONCPP_STRING& path,
const InArgs& in) {
1493 const char* current = path.c_str();
1494 const char* end = current + path.length();
1495 InArgs::const_iterator itInArg = in.begin();
1496 while (current != end) {
1497 if (*current ==
'[') {
1499 if (*current ==
'%')
1500 addPathInArg(path, in, itInArg, PathArgument::kindIndex);
1503 for (; current != end && *current >=
'0' && *current <=
'9'; ++current)
1504 index = index * 10 +
ArrayIndex(*current -
'0');
1505 args_.push_back(index);
1507 if (current == end || *++current !=
']')
1508 invalidPath(path,
int(current - path.c_str()));
1509 }
else if (*current ==
'%') {
1510 addPathInArg(path, in, itInArg, PathArgument::kindKey);
1512 }
else if (*current ==
'.' || *current ==
']') {
1515 const char* beginName = current;
1516 while (current != end && !strchr(
"[.", *current))
1525 InArgs::const_iterator& itInArg,
1526 PathArgument::Kind kind) {
1527 if (itInArg == in.end()) {
1529 }
else if ((*itInArg)->kind_ != kind) {
1532 args_.push_back(**itInArg++);
1541 const Value* node = &root;
1542 for (Args::const_iterator it = args_.begin(); it != args_.end(); ++it) {
1544 if (arg.kind_ == PathArgument::kindIndex) {
1549 node = &((*node)[arg.index_]);
1550 }
else if (arg.kind_ == PathArgument::kindKey) {
1555 node = &((*node)[arg.key_]);
1567 const Value* node = &root;
1568 for (Args::const_iterator it = args_.begin(); it != args_.end(); ++it) {
1570 if (arg.kind_ == PathArgument::kindIndex) {
1572 return defaultValue;
1573 node = &((*node)[arg.index_]);
1574 }
else if (arg.kind_ == PathArgument::kindKey) {
1576 return defaultValue;
1577 node = &((*node)[arg.key_]);
1579 return defaultValue;
1586 Value* node = &root;
1587 for (Args::const_iterator it = args_.begin(); it != args_.end(); ++it) {
1589 if (arg.kind_ == PathArgument::kindIndex) {
1593 node = &((*node)[arg.index_]);
1594 }
else if (arg.kind_ == PathArgument::kindKey) {
1598 node = &((*node)[arg.key_]);
Path(const std::string &path, const PathArgument &a1=PathArgument(), const PathArgument &a2=PathArgument(), const PathArgument &a3=PathArgument(), const PathArgument &a4=PathArgument(), const PathArgument &a5=PathArgument())
Writes a Value in JSON format in a human friendly way.
static bool IsIntegral(double d)
int compare(const Value &other) const
static const Int64 maxInt64
Maximum signed 64 bits int value that can be stored in a Json::Value.
Value const * find(char const *begin, char const *end) const
Most general and efficient version of isMember()const, get()const, and operator[]const.
Value & make(Value &root) const
Creates the "path" to access the specified node and returns a reference on the node.
LargestUInt asLargestUInt() const
array value (ordered list)
#define JSON_ASSERT_MESSAGE(condition, message)
static Value const & nullSingleton()
Prefer this to null or nullRef.
Json::ArrayIndex ArrayIndex
bool empty() const
Return true if empty array, empty object, or null; otherwise, false.
Members getMemberNames() const
Return a list of the member names.
object value (collection of name/value pairs).
bool getString(char const **begin, char const **end) const
Get raw char* of string-value.
void swapPayload(Value &other)
Swap values but leave comments and source offsets in place.
RuntimeError(std::string const &msg)
bool removeIndex(ArrayIndex i, Value *removed)
Remove the indexed array element.
static const Int maxInt
Maximum signed int value that can be stored in a Json::Value.
ptrdiff_t getOffsetStart() const
static const Value & null
We regret this reference to a global instance; prefer the simpler Value().
Lightweight wrapper to tag static string.
Value removeMember(const char *key)
Remove and return the named member.
std::string toStyledString() const
#define JSON_ASSERT(condition)
It should not be possible for a maliciously designed file to cause an abort() or seg-fault, so these macros are used only for pre-condition violations and internal logic errors.
static const UInt maxUInt
Maximum unsigned int value that can be stored in a Json::Value.
static const Value & nullRef
just a kludge for binary-compatibility; same as null
Json::LargestUInt LargestUInt
LogicError(std::string const &msg)
Value & operator=(Value other)
Deep copy, then swap(other).
static void releaseStringValue(char *value, unsigned)
const iterator for object and array value.
Value(ValueType type=nullValue)
Create a default Value of the given type.
Experimental and untested: represents an element of the "path" to access a node.
void setComment(const char *comment, CommentPlacement placement)
static bool InRange(double d, T min, U max)
static const LargestInt minLargestInt
Minimum signed integer value that can be stored in a Json::Value.
std::string getComment(CommentPlacement placement) const
Include delimiters and embedded newlines.
static void decodePrefixedString(bool isPrefixed, char const *prefixed, unsigned *length, char const **value)
Value & operator[](ArrayIndex index)
Access an array element (zero based index ).
ArrayIndex size() const
Number of values in array or object.
const char * asCString() const
Embedded zeroes could cause you trouble!
bool operator==(const Value &other) const
ValueConstIterator const_iterator
LargestInt asLargestInt() const
bool operator>(const Value &other) const
std::string valueToString(Int value)
bool isValidIndex(ArrayIndex index) const
Return true if index < size().
std::string asString() const
Embedded zeroes are possible.
bool operator>=(const Value &other) const
std::string write(const Value &root)
Serialize a Value in JSON format.
JSON (JavaScript Object Notation).
bool operator==(const SecureAllocator< T > &, const SecureAllocator< U > &)
#define JSON_FAIL_MESSAGE(message)
void swap(Value &other)
Swap everything.
Json::LargestInt LargestInt
static const double maxUInt64AsDouble
static const UInt64 maxUInt64
Maximum unsigned 64 bits int value that can be stored in a Json::Value.
ptrdiff_t getOffsetLimit() const
const char * c_str() const
Value get(ArrayIndex index, const Value &defaultValue) const
If the array contains at least index+1 elements, returns the element value, otherwise returns default...
const_iterator begin() const
Exception(std::string const &msg)
Value & append(const Value &value)
Append value to array at the end.
static char * duplicateAndPrefixStringValue(const char *value, unsigned int length)
#define JSON_ASSERT_UNREACHABLE
void setOffsetStart(ptrdiff_t start)
static char * duplicateStringValue(const char *value, size_t length)
Duplicates the specified string value.
static const Int64 minInt64
Minimum signed 64 bits int value that can be stored in a Json::Value.
static const Int minInt
Minimum signed int value that can be stored in a Json::Value.
Exceptions which the user cannot easily avoid.
bool hasComment(CommentPlacement placement) const
void resize(ArrayIndex size)
Resize the array to size elements.
void clear()
Remove all object members and array elements.
bool operator!=(const Value &other) const
Iterator for object and array value.
static void releasePrefixedStringValue(char *value)
Free the string duplicated by duplicateStringValue()/duplicateAndPrefixStringValue().
void setOffsetLimit(ptrdiff_t limit)
bool isMember(const char *key) const
Return true if the object has a member named key.
std::vector< std::string > Members
bool operator<=(const Value &other) const
bool operator!() const
Return isNull()
const Value & resolve(const Value &root) const
bool isConvertibleTo(ValueType other) const
bool operator<(const Value &other) const
Compare payload only, not comments etc.
char const * what() const
Base class for all exceptions we throw.
const_iterator end() const
static const LargestInt maxLargestInt
Maximum signed integer value that can be stored in a Json::Value.
static const LargestUInt maxLargestUInt
Maximum unsigned integer value that can be stored in a Json::Value.