75 #ifndef JSON_AMALGATED_H_INCLUDED
76 # define JSON_AMALGATED_H_INCLUDED
77 #define JSON_IS_AMALGAMATION
90 #ifndef JSON_CONFIG_H_INCLUDED
91 # define JSON_CONFIG_H_INCLUDED
113 # ifndef JSON_USE_EXCEPTION
114 # define JSON_USE_EXCEPTION 1
123 # ifdef JSON_IN_CPPTL
124 # include <cpptl/config.h>
125 # ifndef JSON_USE_CPPTL
126 # define JSON_USE_CPPTL 1
130 # ifdef JSON_IN_CPPTL
131 # define JSON_API CPPTL_API
132 # elif defined(JSON_DLL_BUILD)
133 # define JSON_API __declspec(dllexport)
134 # elif defined(JSON_DLL)
135 # define JSON_API __declspec(dllimport)
144 #if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6
147 #define JSON_USE_INT64_DOUBLE_CONVERSION 1
148 #endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6
150 #if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008
151 # define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
155 #if !defined(JSONCPP_DEPRECATED)
156 # define JSONCPP_DEPRECATED(message)
157 #endif // if !defined(JSONCPP_DEPRECATED)
161 typedef unsigned int UInt;
162 # if defined(JSON_NO_INT64)
163 typedef int LargestInt;
164 typedef unsigned int LargestUInt;
165 # undef JSON_HAS_INT64
166 # else // if defined(JSON_NO_INT64)
168 # if defined(_MSC_VER) // Microsoft Visual Studio
169 typedef __int64 Int64;
170 typedef unsigned __int64 UInt64;
171 # else // if defined(_MSC_VER) // Other platforms, use long long
172 typedef long long int Int64;
173 typedef unsigned long long int UInt64;
174 # endif // if defined(_MSC_VER)
175 typedef Int64 LargestInt;
176 typedef UInt64 LargestUInt;
177 # define JSON_HAS_INT64
178 # endif // if defined(JSON_NO_INT64)
182 #endif // JSON_CONFIG_H_INCLUDED
202 #ifndef JSON_FORWARDS_H_INCLUDED
203 # define JSON_FORWARDS_H_INCLUDED
205 #if !defined(JSON_IS_AMALGAMATION)
207 #endif // if !defined(JSON_IS_AMALGAMATION)
222 typedef unsigned int ArrayIndex;
227 class ValueIteratorBase;
229 class ValueConstIterator;
230 #ifdef JSON_VALUE_USE_INTERNAL_MAP
231 class ValueMapAllocator;
232 class ValueInternalLink;
233 class ValueInternalArray;
234 class ValueInternalMap;
235 #endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
240 #endif // JSON_FORWARDS_H_INCLUDED
260 #ifndef CPPTL_JSON_FEATURES_H_INCLUDED
261 # define CPPTL_JSON_FEATURES_H_INCLUDED
263 #if !defined(JSON_IS_AMALGAMATION)
264 # include "forwards.h"
265 #endif // if !defined(JSON_IS_AMALGAMATION)
303 #endif // CPPTL_JSON_FEATURES_H_INCLUDED
323 #ifndef CPPTL_JSON_H_INCLUDED
324 # define CPPTL_JSON_H_INCLUDED
326 #if !defined(JSON_IS_AMALGAMATION)
327 # include "forwards.h"
328 #endif // if !defined(JSON_IS_AMALGAMATION)
332 # ifndef JSON_USE_CPPTL_SMALLMAP
335 # include <cpptl/smallmap.h>
337 # ifdef JSON_USE_CPPTL
338 # include <cpptl/forwards.h>
364 numberOfCommentPlacement
394 operator const char *()
const
399 const char *c_str()
const
438 # ifdef JSON_VALUE_USE_INTERNAL_MAP
439 friend class ValueInternalLink;
440 friend class ValueInternalMap;
443 typedef std::vector<std::string> Members;
446 typedef Json::UInt UInt;
447 typedef Json::Int Int;
448 # if defined(JSON_HAS_INT64)
449 typedef Json::UInt64 UInt64;
450 typedef Json::Int64 Int64;
451 #endif // defined(JSON_HAS_INT64)
452 typedef Json::LargestInt LargestInt;
453 typedef Json::LargestUInt LargestUInt;
454 typedef Json::ArrayIndex ArrayIndex;
456 static const Value null;
471 # if defined(JSON_HAS_INT64)
472 static const Int64 minInt64;
478 #endif // defined(JSON_HAS_INT64)
481 #ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
482 # ifndef JSON_VALUE_USE_INTERNAL_MAP
486 enum DuplicationPolicy
492 CZString( ArrayIndex index );
493 CZString(
const char *cstr, DuplicationPolicy allocate );
494 CZString(
const CZString &other );
496 CZString &operator =(
const CZString &other );
497 bool operator<(
const CZString &other )
const;
498 bool operator==(
const CZString &other )
const;
499 ArrayIndex index()
const;
500 const char *c_str()
const;
501 bool isStaticString()
const;
503 void swap( CZString &other );
509 # ifndef JSON_USE_CPPTL_SMALLMAP
510 typedef std::map<CZString, Value> ObjectValues;
512 typedef CppTL::SmallMap<CZString, Value> ObjectValues;
513 # endif // ifndef JSON_USE_CPPTL_SMALLMAP
514 # endif // ifndef JSON_VALUE_USE_INTERNAL_MAP
515 #endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
536 #if defined(JSON_HAS_INT64)
537 Value( Int64 value );
538 Value( UInt64 value );
539 #endif // if defined(JSON_HAS_INT64)
540 Value(
double value );
541 Value(
const char *value );
542 Value(
const char *beginValue,
const char *endValue );
554 Value(
const std::string &value );
555 # ifdef JSON_USE_CPPTL
556 Value(
const CppTL::ConstString &value );
566 void swap(
Value &other );
570 bool operator <(
const Value &other )
const;
571 bool operator <=(
const Value &other )
const;
572 bool operator >=(
const Value &other )
const;
573 bool operator >(
const Value &other )
const;
575 bool operator ==(
const Value &other )
const;
576 bool operator !=(
const Value &other )
const;
578 int compare(
const Value &other )
const;
580 const char *asCString()
const;
581 std::string asString()
const;
582 # ifdef JSON_USE_CPPTL
583 CppTL::ConstString asConstString()
const;
587 #if defined(JSON_HAS_INT64)
588 Int64 asInt64()
const;
589 UInt64 asUInt64()
const;
590 #endif // if defined(JSON_HAS_INT64)
591 LargestInt asLargestInt()
const;
592 LargestUInt asLargestUInt()
const;
593 float asFloat()
const;
594 double asDouble()
const;
600 bool isInt64()
const;
602 bool isUInt64()
const;
603 bool isIntegral()
const;
604 bool isDouble()
const;
605 bool isNumeric()
const;
606 bool isString()
const;
607 bool isArray()
const;
608 bool isObject()
const;
610 bool isConvertibleTo(
ValueType other )
const;
613 ArrayIndex size()
const;
620 bool operator!()
const;
632 void resize( ArrayIndex size );
639 Value &operator[]( ArrayIndex index );
646 Value &operator[](
int index );
651 const Value &operator[]( ArrayIndex index )
const;
656 const Value &operator[](
int index )
const;
660 Value get( ArrayIndex index,
661 const Value &defaultValue )
const;
663 bool isValidIndex( ArrayIndex index )
const;
670 Value &operator[](
const char *key );
672 const Value &operator[](
const char *key )
const;
674 Value &operator[](
const std::string &key );
676 const Value &operator[](
const std::string &key )
const;
689 # ifdef JSON_USE_CPPTL
690 Value &operator[](
const CppTL::ConstString &key );
693 const Value &operator[](
const CppTL::ConstString &key )
const;
695 Value get(
const char *key,
697 const Value &defaultValue )
const;
699 Value get(
const std::string &key,
700 const Value &defaultValue )
const;
701 # ifdef JSON_USE_CPPTL
702 Value get(
const CppTL::ConstString &key,
704 const Value &defaultValue )
const;
706 Value removeMember(
const char* key );
714 Value removeMember(
const std::string &key );
717 bool isMember(
const char *key )
const;
719 bool isMember(
const std::string &key )
const;
720 # ifdef JSON_USE_CPPTL
721 bool isMember(
const CppTL::ConstString &key )
const;
730 Members getMemberNames()
const;
738 void setComment(
const char *comment,
741 void setComment(
const std::string &comment,
747 std::string toStyledString()
const;
749 const_iterator begin()
const;
750 const_iterator end()
const;
756 Value &resolveReference(
const char *key,
759 # ifdef JSON_VALUE_USE_INTERNAL_MAP
760 inline bool isItemAvailable()
const
762 return itemIsUsed_ == 0;
765 inline void setItemUsed(
bool isUsed =
true )
767 itemIsUsed_ = isUsed ? 1 : 0;
770 inline bool isMemberNameStatic()
const
772 return memberNameIsStatic_ == 0;
775 inline void setMemberNameIsStatic(
bool isStatic )
777 memberNameIsStatic_ = isStatic ? 1 : 0;
779 # endif // # ifdef JSON_VALUE_USE_INTERNAL_MAP
787 void setComment(
const char *text );
808 # ifdef JSON_VALUE_USE_INTERNAL_MAP
809 ValueInternalArray *array_;
810 ValueInternalMap *map_;
817 # ifdef JSON_VALUE_USE_INTERNAL_MAP
818 unsigned int itemIsUsed_ : 1;
819 int memberNameIsStatic_ : 1;
821 CommentInfo *comments_;
863 Path(
const std::string &path,
870 const Value &resolve(
const Value &root )
const;
872 const Value &defaultValue )
const;
877 typedef std::vector<const PathArgument *> InArgs;
878 typedef std::vector<PathArgument> Args;
880 void makePath(
const std::string &path,
882 void addPathInArg(
const std::string &path,
884 InArgs::const_iterator &itInArg,
885 PathArgument::Kind kind );
886 void invalidPath(
const std::string &path,
894 #ifdef JSON_VALUE_USE_INTERNAL_MAP
939 class JSON_API ValueMapAllocator
942 virtual ~ValueMapAllocator();
943 virtual ValueInternalMap *newMap() = 0;
944 virtual ValueInternalMap *newMapCopy(
const ValueInternalMap &other ) = 0;
945 virtual void destructMap( ValueInternalMap *map ) = 0;
946 virtual ValueInternalLink *allocateMapBuckets(
unsigned int size ) = 0;
947 virtual void releaseMapBuckets( ValueInternalLink *links ) = 0;
948 virtual ValueInternalLink *allocateMapLink() = 0;
949 virtual void releaseMapLink( ValueInternalLink *link ) = 0;
955 class JSON_API ValueInternalLink
958 enum { itemPerLink = 6 };
966 ~ValueInternalLink();
968 Value items_[itemPerLink];
969 char *keys_[itemPerLink];
970 ValueInternalLink *previous_;
971 ValueInternalLink *next_;
987 class JSON_API ValueInternalMap
989 friend class ValueIteratorBase;
992 typedef unsigned int HashKey;
993 typedef unsigned int BucketIndex;
995 # ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
1005 ValueInternalMap *map_;
1006 ValueInternalLink *link_;
1007 BucketIndex itemIndex_;
1008 BucketIndex bucketIndex_;
1010 # endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
1013 ValueInternalMap(
const ValueInternalMap &other );
1014 ValueInternalMap &operator =(
const ValueInternalMap &other );
1015 ~ValueInternalMap();
1017 void swap( ValueInternalMap &other );
1019 BucketIndex size()
const;
1023 bool reserveDelta( BucketIndex growth );
1025 bool reserve( BucketIndex newItemCount );
1027 const Value *find(
const char *key )
const;
1029 Value *find(
const char *key );
1031 Value &resolveReference(
const char *key,
1034 void remove(
const char *key );
1036 void doActualRemove( ValueInternalLink *link,
1038 BucketIndex bucketIndex );
1040 ValueInternalLink *&getLastLinkInBucket( BucketIndex bucketIndex );
1042 Value &setNewItem(
const char *key,
1044 ValueInternalLink *link,
1045 BucketIndex index );
1047 Value &unsafeAdd(
const char *key,
1049 HashKey hashedKey );
1051 HashKey hash(
const char *key )
const;
1053 int compare(
const ValueInternalMap &other )
const;
1056 void makeBeginIterator( IteratorState &it )
const;
1057 void makeEndIterator( IteratorState &it )
const;
1058 static bool equals(
const IteratorState &x,
const IteratorState &other );
1059 static void increment( IteratorState &iterator );
1060 static void incrementBucket( IteratorState &iterator );
1061 static void decrement( IteratorState &iterator );
1062 static const char *key(
const IteratorState &iterator );
1063 static const char *key(
const IteratorState &iterator,
bool &isStatic );
1064 static Value &value(
const IteratorState &iterator );
1065 static int distance(
const IteratorState &x,
const IteratorState &y );
1068 ValueInternalLink *buckets_;
1069 ValueInternalLink *tailLink_;
1070 BucketIndex bucketsSize_;
1071 BucketIndex itemCount_;
1085 class JSON_API ValueInternalArray
1088 friend class ValueIteratorBase;
1090 enum { itemsPerPage = 8 };
1091 typedef Value::ArrayIndex ArrayIndex;
1092 typedef unsigned int PageIndex;
1094 # ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
1095 struct IteratorState
1099 , currentPageIndex_(0)
1100 , currentItemIndex_(0)
1103 ValueInternalArray *array_;
1104 Value **currentPageIndex_;
1105 unsigned int currentItemIndex_;
1107 # endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
1109 ValueInternalArray();
1110 ValueInternalArray(
const ValueInternalArray &other );
1111 ValueInternalArray &operator =(
const ValueInternalArray &other );
1112 ~ValueInternalArray();
1113 void swap( ValueInternalArray &other );
1116 void resize( ArrayIndex newSize );
1118 Value &resolveReference( ArrayIndex index );
1120 Value *find( ArrayIndex index )
const;
1122 ArrayIndex size()
const;
1124 int compare(
const ValueInternalArray &other )
const;
1127 static bool equals(
const IteratorState &x,
const IteratorState &other );
1128 static void increment( IteratorState &iterator );
1129 static void decrement( IteratorState &iterator );
1130 static Value &dereference(
const IteratorState &iterator );
1131 static Value &unsafeDereference(
const IteratorState &iterator );
1132 static int distance(
const IteratorState &x,
const IteratorState &y );
1133 static ArrayIndex indexOf(
const IteratorState &iterator );
1134 void makeBeginIterator( IteratorState &it )
const;
1135 void makeEndIterator( IteratorState &it )
const;
1136 void makeIterator( IteratorState &it, ArrayIndex index )
const;
1138 void makeIndexValid( ArrayIndex index );
1142 PageIndex pageCount_;
1204 class JSON_API ValueArrayAllocator
1207 virtual ~ValueArrayAllocator();
1208 virtual ValueInternalArray *newArray() = 0;
1209 virtual ValueInternalArray *newArrayCopy(
const ValueInternalArray &other ) = 0;
1210 virtual void destructArray( ValueInternalArray *array ) = 0;
1222 virtual void reallocateArrayPageIndex( Value **&indexes,
1223 ValueInternalArray::PageIndex &indexCount,
1224 ValueInternalArray::PageIndex minNewIndexCount ) = 0;
1225 virtual void releaseArrayPageIndex( Value **indexes,
1226 ValueInternalArray::PageIndex indexCount ) = 0;
1227 virtual Value *allocateArrayPage() = 0;
1228 virtual void releaseArrayPage( Value *value ) = 0;
1230 #endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
1239 typedef unsigned int size_t;
1240 typedef int difference_type;
1244 #ifndef JSON_VALUE_USE_INTERNAL_MAP
1251 bool operator ==(
const SelfType &other )
const
1253 return isEqual( other );
1256 bool operator !=(
const SelfType &other )
const
1258 return !isEqual( other );
1261 difference_type operator -(
const SelfType &other )
const
1263 return computeDistance( other );
1276 Value &deref()
const;
1282 difference_type computeDistance(
const SelfType &other )
const;
1284 bool isEqual(
const SelfType &other )
const;
1286 void copy(
const SelfType &other );
1289 #ifndef JSON_VALUE_USE_INTERNAL_MAP
1290 Value::ObjectValues::iterator current_;
1296 ValueInternalArray::IteratorState array_;
1297 ValueInternalMap::IteratorState map_;
1310 typedef unsigned int size_t;
1311 typedef int difference_type;
1320 #ifndef JSON_VALUE_USE_INTERNAL_MAP
1368 typedef unsigned int size_t;
1369 typedef int difference_type;
1380 #ifndef JSON_VALUE_USE_INTERNAL_MAP
1381 explicit ValueIterator(
const Value::ObjectValues::iterator ¤t );
1383 ValueIterator(
const ValueInternalArray::IteratorState &state );
1384 ValueIterator(
const ValueInternalMap::IteratorState &state );
1426 #endif // CPPTL_JSON_H_INCLUDED
1446 #ifndef CPPTL_JSON_READER_H_INCLUDED
1447 # define CPPTL_JSON_READER_H_INCLUDED
1449 #if !defined(JSON_IS_AMALGAMATION)
1450 # include "features.h"
1452 #endif // if !defined(JSON_IS_AMALGAMATION)
1466 typedef const Char *Location;
1488 bool parse(
const std::string &document,
1490 bool collectComments =
true );
1504 bool parse(
const char *beginDoc,
const char *endDoc,
1506 bool collectComments =
true );
1510 bool parse( std::istream &is,
1512 bool collectComments =
true );
1520 JSONCPP_DEPRECATED(
"Use getFormattedErrorMessages instead")
1521 std::string getFormatedErrorMessages()
const;
1528 std::string getFormattedErrorMessages()
const;
1533 tokenEndOfStream = 0,
1543 tokenArraySeparator,
1544 tokenMemberSeparator,
1561 std::string message_;
1565 typedef std::deque<ErrorInfo> Errors;
1567 bool expectToken( TokenType type, Token &token,
const char *message );
1568 bool readToken( Token &token );
1570 bool match( Location pattern,
1571 int patternLength );
1573 bool readCStyleComment();
1574 bool readCppStyleComment();
1578 bool readObject( Token &token );
1579 bool readArray( Token &token );
1580 bool decodeNumber( Token &token );
1581 bool decodeString( Token &token );
1582 bool decodeString( Token &token, std::string &decoded );
1583 bool decodeDouble( Token &token );
1584 bool decodeUnicodeCodePoint( Token &token,
1587 unsigned int &unicode );
1588 bool decodeUnicodeEscapeSequence( Token &token,
1591 unsigned int &unicode );
1592 bool addError(
const std::string &message,
1594 Location extra = 0 );
1595 bool recoverFromError( TokenType skipUntilToken );
1596 bool addErrorAndRecover(
const std::string &message,
1598 TokenType skipUntilToken );
1599 void skipUntilSpace();
1600 Value ¤tValue();
1602 void getLocationLineAndColumn( Location location,
1604 int &column )
const;
1605 std::string getLocationLineAndColumn( Location location )
const;
1606 void addComment( Location begin,
1609 void skipCommentTokens( Token &token );
1611 typedef std::stack<Value *> Nodes;
1614 std::string document_;
1618 Location lastValueEnd_;
1620 std::string commentsBefore_;
1622 bool collectComments_;
1653 #endif // CPPTL_JSON_READER_H_INCLUDED
1673 #ifndef JSON_WRITER_H_INCLUDED
1674 # define JSON_WRITER_H_INCLUDED
1676 #if !defined(JSON_IS_AMALGAMATION)
1678 #endif // if !defined(JSON_IS_AMALGAMATION)
1693 virtual std::string write(
const Value &root ) = 0;
1708 void enableYAMLCompatibility();
1715 void dropNullPlaceholders();
1718 virtual std::string write(
const Value &root );
1721 void writeValue(
const Value &value );
1723 std::string document_;
1724 bool yamlCompatiblityEnabled_;
1725 bool dropNullPlaceholders_;
1757 virtual std::string write(
const Value &root );
1760 void writeValue(
const Value &value );
1761 void writeArrayValue(
const Value &value );
1762 bool isMultineArray(
const Value &value );
1763 void pushValue(
const std::string &value );
1765 void writeWithIndent(
const std::string &value );
1768 void writeCommentBeforeValue(
const Value &root );
1769 void writeCommentAfterValueOnSameLine(
const Value &root );
1770 bool hasCommentForValue(
const Value &value );
1771 static std::string normalizeEOL(
const std::string &text );
1773 typedef std::vector<std::string> ChildValues;
1775 ChildValues childValues_;
1776 std::string document_;
1777 std::string indentString_;
1780 bool addChildValues_;
1815 void write( std::ostream &out,
const Value &root );
1818 void writeValue(
const Value &value );
1819 void writeArrayValue(
const Value &value );
1820 bool isMultineArray(
const Value &value );
1821 void pushValue(
const std::string &value );
1823 void writeWithIndent(
const std::string &value );
1826 void writeCommentBeforeValue(
const Value &root );
1827 void writeCommentAfterValueOnSameLine(
const Value &root );
1828 bool hasCommentForValue(
const Value &value );
1829 static std::string normalizeEOL(
const std::string &text );
1831 typedef std::vector<std::string> ChildValues;
1833 ChildValues childValues_;
1834 std::ostream* document_;
1835 std::string indentString_;
1837 std::string indentation_;
1838 bool addChildValues_;
1841 # if defined(JSON_HAS_INT64)
1842 std::string JSON_API valueToString( Int value );
1843 std::string JSON_API valueToString( UInt value );
1844 # endif // if defined(JSON_HAS_INT64)
1845 std::string JSON_API valueToString( LargestInt value );
1846 std::string JSON_API valueToString( LargestUInt value );
1847 std::string JSON_API valueToString(
double value );
1848 std::string JSON_API valueToString(
bool value );
1849 std::string JSON_API valueToQuotedString(
const char *value );
1859 #endif // JSON_WRITER_H_INCLUDED
1879 #ifndef CPPTL_JSON_ASSERTIONS_H_INCLUDED
1880 # define CPPTL_JSON_ASSERTIONS_H_INCLUDED
1884 #if !defined(JSON_IS_AMALGAMATION)
1885 # include <json/config.h>
1886 #endif // if !defined(JSON_IS_AMALGAMATION)
1888 #if JSON_USE_EXCEPTION
1889 #define JSON_ASSERT( condition ) assert( condition ); // @todo <= change this into an exception throw
1890 #define JSON_FAIL_MESSAGE( message ) throw std::runtime_error( message );
1891 #else // JSON_USE_EXCEPTION
1892 #define JSON_ASSERT( condition ) assert( condition );
1898 #define JSON_FAIL_MESSAGE( message ) { assert(false && message); strcpy(reinterpret_cast<char*>(666), message); exit(123); }
1902 #define JSON_ASSERT_MESSAGE( condition, message ) if (!( condition )) { JSON_FAIL_MESSAGE( message ) }
1904 #endif // CPPTL_JSON_ASSERTIONS_H_INCLUDED
1914 #endif //ifndef JSON_AMALGATED_H_INCLUDED
Outputs a Value in JSON format without formatting (not human friendly).
Definition: json.h:1702
Writes a Value in JSON format in a human friendly way.
Definition: json.h:1746
Value & make(Value &root) const
Creates the "path" to access the specified node and returns a reference on the node.
Definition: jsoncpp.cpp:3468
static const Int64 maxInt64
Maximum signed 64 bits int value that can be stored in a Json::Value.
Definition: json.h:475
base class for Value iterators.
Definition: json.h:1236
array value (ordered list)
Definition: json.h:355
unsigned integer value
Definition: json.h:351
object value (collection of name/value pairs).
Definition: json.h:356
std::istream & operator>>(std::istream &, Value &)
Read from 'sin' into 'root'.
Definition: jsoncpp.cpp:1091
static const Int maxInt
Maximum signed int value that can be stored in a Json::Value.
Definition: json.h:467
Lightweight wrapper to tag static string.
Definition: json.h:386
static const UInt maxUInt
Maximum unsigned int value that can be stored in a Json::Value.
Definition: json.h:469
const iterator for object and array value.
Definition: json.h:1306
Experimental and untested: represents an element of the "path" to access a node.
Definition: json.h:827
static const LargestInt minLargestInt
Minimum signed integer value that can be stored in a Json::Value.
Definition: json.h:458
'null' value
Definition: json.h:349
bool allowComments_
true if comments are allowed. Default: true.
Definition: json.h:295
CommentPlacement
Definition: json.h:359
Experimental and untested: represents a "path" to access a node.
Definition: json.h:860
static const UInt64 maxUInt64
Maximum unsigned 64 bits int value that can be stored in a Json::Value.
Definition: json.h:477
double value
Definition: json.h:352
Abstract class for writers.
Definition: json.h:1688
Represents a JSON value.
Definition: json.h:435
UInt index() const
Return the index of the referenced Value. -1 if it is not an arrayValue.
Definition: jsoncpp.cpp:1447
static const Int minInt
Minimum signed int value that can be stored in a Json::Value.
Definition: json.h:465
a comment on the line after a value (only make sense for root value)
Definition: json.h:363
Unserialize a JSON document into a Value.
Definition: json.h:1462
Value key() const
Return either the index or the member name of the referenced value as a Value.
Definition: jsoncpp.cpp:1423
Writes a Value in JSON format in a human friendly way, to a stream rather than to a string...
Definition: json.h:1803
Iterator for object and array value.
Definition: json.h:1364
ValueType
Type of the value held by a Value object.
Definition: json.h:347
bool strictRoot_
true if root must be either an array or an object value. Default: false.
Definition: json.h:298
bool value
Definition: json.h:354
signed integer value
Definition: json.h:350
Configuration passed to reader and writer. This configuration object can be used to force the Reader ...
Definition: json.h:273
a comment placed on the line before a value
Definition: json.h:361
UTF-8 string value.
Definition: json.h:353
a comment just after a value on the same line
Definition: json.h:362
const char * memberName() const
Return the member name of the referenced Value. "" if it is not an objectValue.
Definition: jsoncpp.cpp:1463
std::ostream & operator<<(std::ostream &, const Value &root)
Output using the StyledStreamWriter.
Definition: jsoncpp.cpp:4350
static const LargestInt maxLargestInt
Maximum signed integer value that can be stored in a Json::Value.
Definition: json.h:460
static const LargestUInt maxLargestUInt
Maximum unsigned integer value that can be stored in a Json::Value.
Definition: json.h:462