71 #ifdef PYNE_IS_AMALGAMATED 72 #if !defined(JSON_IS_AMALGAMATION) 73 #define JSON_IS_AMALGAMATION 79 #ifndef JSON_AMALGATED_H_INCLUDED 80 # define JSON_AMALGATED_H_INCLUDED 81 #define JSON_IS_AMALGATED 94 #ifndef JSON_CONFIG_H_INCLUDED 95 # define JSON_CONFIG_H_INCLUDED 117 # define JSON_USE_EXCEPTION 1 125 # ifdef JSON_IN_CPPTL 126 # include <cpptl/config.h> 127 # ifndef JSON_USE_CPPTL 128 # define JSON_USE_CPPTL 1 132 # ifdef JSON_IN_CPPTL 133 # define JSON_API CPPTL_API 134 # elif defined(JSON_DLL_BUILD) 135 # define JSON_API __declspec(dllexport) 136 # elif defined(JSON_DLL) 137 # define JSON_API __declspec(dllimport) 146 #if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6 149 #define JSON_USE_INT64_DOUBLE_CONVERSION 1 150 #endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6 152 #if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008 153 # define JSONCPP_DEPRECATED(message) __declspec(deprecated(message)) 157 #if !defined(JSONCPP_DEPRECATED) 158 # define JSONCPP_DEPRECATED(message) 159 #endif // if !defined(JSONCPP_DEPRECATED) 163 typedef unsigned int UInt;
164 # if defined(JSON_NO_INT64) 165 typedef int LargestInt;
166 typedef unsigned int LargestUInt;
167 # undef JSON_HAS_INT64 168 # else // if defined(JSON_NO_INT64) 170 # if defined(_MSC_VER) // Microsoft Visual Studio 171 typedef __int64 Int64;
172 typedef unsigned __int64 UInt64;
173 # else // if defined(_MSC_VER) // Other platforms, use long long 174 typedef long long int Int64;
175 typedef unsigned long long int UInt64;
176 # endif // if defined(_MSC_VER) 177 typedef Int64 LargestInt;
178 typedef UInt64 LargestUInt;
179 # define JSON_HAS_INT64 180 # endif // if defined(JSON_NO_INT64) 184 #endif // JSON_CONFIG_H_INCLUDED 204 #ifndef JSON_FORWARDS_H_INCLUDED 205 # define JSON_FORWARDS_H_INCLUDED 207 #if !defined(JSON_IS_AMALGAMATION) 209 #endif // if !defined(JSON_IS_AMALGAMATION) 224 typedef unsigned int ArrayIndex;
229 class ValueIteratorBase;
231 class ValueConstIterator;
232 #ifdef JSON_VALUE_USE_INTERNAL_MAP 233 class ValueMapAllocator;
234 class ValueInternalLink;
235 class ValueInternalArray;
236 class ValueInternalMap;
237 #endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP 242 #endif // JSON_FORWARDS_H_INCLUDED 262 #ifndef CPPTL_JSON_FEATURES_H_INCLUDED 263 # define CPPTL_JSON_FEATURES_H_INCLUDED 265 #if !defined(JSON_IS_AMALGAMATION) 266 # include "forwards.h" 267 #endif // if !defined(JSON_IS_AMALGAMATION) 275 class JSON_API Features
283 static Features all();
290 static Features strictMode();
305 #endif // CPPTL_JSON_FEATURES_H_INCLUDED 325 #ifndef CPPTL_JSON_H_INCLUDED 326 # define CPPTL_JSON_H_INCLUDED 328 #if !defined(JSON_IS_AMALGAMATION) 329 # include "forwards.h" 330 #endif // if !defined(JSON_IS_AMALGAMATION) 334 # ifndef JSON_USE_CPPTL_SMALLMAP 337 # include <cpptl/smallmap.h> 339 # ifdef JSON_USE_CPPTL 340 # include <cpptl/forwards.h> 366 numberOfCommentPlacement
388 class JSON_API StaticString
391 explicit StaticString(
const char *czstring )
396 operator const char *()
const 401 const char *c_str()
const 439 friend class ValueIteratorBase;
440 # ifdef JSON_VALUE_USE_INTERNAL_MAP 441 friend class ValueInternalLink;
442 friend class ValueInternalMap;
445 typedef std::vector<std::string> Members;
446 typedef ValueIterator iterator;
447 typedef ValueConstIterator const_iterator;
448 typedef Json::UInt UInt;
449 typedef Json::Int Int;
450 # if defined(JSON_HAS_INT64) 451 typedef Json::UInt64 UInt64;
452 typedef Json::Int64 Int64;
453 #endif // defined(JSON_HAS_INT64) 454 typedef Json::LargestInt LargestInt;
455 typedef Json::LargestUInt LargestUInt;
456 typedef Json::ArrayIndex ArrayIndex;
458 static const Value null;
460 static const LargestInt minLargestInt;
462 static const LargestInt maxLargestInt;
464 static const LargestUInt maxLargestUInt;
467 static const Int minInt;
469 static const Int maxInt;
471 static const UInt maxUInt;
474 static const Int64 minInt64;
476 static const Int64 maxInt64;
478 static const UInt64 maxUInt64;
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 );
553 Value(
const StaticString &value );
554 Value(
const std::string &value );
555 # ifdef JSON_USE_CPPTL 556 Value(
const CppTL::ConstString &value );
559 Value(
const Value &other );
562 Value &operator=(
const Value &other );
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 Int64 asInt64()
const;
588 UInt64 asUInt64()
const;
589 LargestInt asLargestInt()
const;
590 LargestUInt asLargestUInt()
const;
591 float asFloat()
const;
592 double asDouble()
const;
599 bool isIntegral()
const;
600 bool isDouble()
const;
601 bool isNumeric()
const;
602 bool isString()
const;
603 bool isArray()
const;
604 bool isObject()
const;
606 bool isConvertibleTo(
ValueType other )
const;
609 ArrayIndex size()
const;
616 bool operator!()
const;
628 void resize( ArrayIndex size );
635 Value &operator[]( ArrayIndex index );
642 Value &operator[](
int index );
647 const Value &operator[]( ArrayIndex index )
const;
652 const Value &operator[](
int index )
const;
656 Value
get( ArrayIndex index,
657 const Value &defaultValue )
const;
659 bool isValidIndex( ArrayIndex index )
const;
663 Value &append(
const Value &value );
666 Value &operator[](
const char *key );
668 const Value &operator[](
const char *key )
const;
670 Value &operator[](
const std::string &key );
672 const Value &operator[](
const std::string &key )
const;
684 Value &operator[](
const StaticString &key );
685 # ifdef JSON_USE_CPPTL 686 Value &operator[](
const CppTL::ConstString &key );
689 const Value &operator[](
const CppTL::ConstString &key )
const;
691 Value
get(
const char *key,
693 const Value &defaultValue )
const;
695 Value
get(
const std::string &key,
696 const Value &defaultValue )
const;
697 # ifdef JSON_USE_CPPTL 698 Value
get(
const CppTL::ConstString &key,
700 const Value &defaultValue )
const;
702 Value removeMember(
const char* key );
710 Value removeMember(
const std::string &key );
713 bool isMember(
const char *key )
const;
715 bool isMember(
const std::string &key )
const;
716 # ifdef JSON_USE_CPPTL 717 bool isMember(
const CppTL::ConstString &key )
const;
726 Members getMemberNames()
const;
734 void setComment(
const char *comment,
737 void setComment(
const std::string &comment,
743 std::string toStyledString()
const;
745 const_iterator begin()
const;
746 const_iterator end()
const;
752 Value &resolveReference(
const char *key,
755 # ifdef JSON_VALUE_USE_INTERNAL_MAP 756 inline bool isItemAvailable()
const 758 return itemIsUsed_ == 0;
761 inline void setItemUsed(
bool isUsed =
true )
763 itemIsUsed_ = isUsed ? 1 : 0;
766 inline bool isMemberNameStatic()
const 768 return memberNameIsStatic_ == 0;
771 inline void setMemberNameIsStatic(
bool isStatic )
773 memberNameIsStatic_ = isStatic ? 1 : 0;
775 # endif // # ifdef JSON_VALUE_USE_INTERNAL_MAP 783 void setComment(
const char *text );
804 # ifdef JSON_VALUE_USE_INTERNAL_MAP 805 ValueInternalArray *array_;
806 ValueInternalMap *map_;
813 # ifdef JSON_VALUE_USE_INTERNAL_MAP 814 unsigned int itemIsUsed_ : 1;
815 int memberNameIsStatic_ : 1;
817 CommentInfo *comments_;
829 PathArgument( ArrayIndex index );
830 PathArgument(
const char *key );
831 PathArgument(
const std::string &key );
859 Path(
const std::string &path,
860 const PathArgument &a1 = PathArgument(),
861 const PathArgument &a2 = PathArgument(),
862 const PathArgument &a3 = PathArgument(),
863 const PathArgument &a4 = PathArgument(),
864 const PathArgument &a5 = PathArgument() );
866 const Value &resolve(
const Value &root )
const;
867 Value resolve(
const Value &root,
868 const Value &defaultValue )
const;
870 Value &make( Value &root )
const;
873 typedef std::vector<const PathArgument *> InArgs;
874 typedef std::vector<PathArgument> Args;
876 void makePath(
const std::string &path,
878 void addPathInArg(
const std::string &path,
880 InArgs::const_iterator &itInArg,
881 PathArgument::Kind kind );
882 void invalidPath(
const std::string &path,
890 #ifdef JSON_VALUE_USE_INTERNAL_MAP 935 class JSON_API ValueMapAllocator
938 virtual ~ValueMapAllocator();
939 virtual ValueInternalMap *newMap() = 0;
940 virtual ValueInternalMap *newMapCopy(
const ValueInternalMap &other ) = 0;
941 virtual void destructMap( ValueInternalMap *map ) = 0;
942 virtual ValueInternalLink *allocateMapBuckets(
unsigned int size ) = 0;
943 virtual void releaseMapBuckets( ValueInternalLink *links ) = 0;
944 virtual ValueInternalLink *allocateMapLink() = 0;
945 virtual void releaseMapLink( ValueInternalLink *link ) = 0;
951 class JSON_API ValueInternalLink
954 enum { itemPerLink = 6 };
962 ~ValueInternalLink();
964 Value items_[itemPerLink];
965 char *keys_[itemPerLink];
966 ValueInternalLink *previous_;
967 ValueInternalLink *next_;
983 class JSON_API ValueInternalMap
985 friend class ValueIteratorBase;
988 typedef unsigned int HashKey;
989 typedef unsigned int BucketIndex;
991 # ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION 1001 ValueInternalMap *map_;
1002 ValueInternalLink *link_;
1003 BucketIndex itemIndex_;
1004 BucketIndex bucketIndex_;
1006 # endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION 1009 ValueInternalMap(
const ValueInternalMap &other );
1010 ValueInternalMap &operator =(
const ValueInternalMap &other );
1011 ~ValueInternalMap();
1013 void swap( ValueInternalMap &other );
1015 BucketIndex size()
const;
1019 bool reserveDelta( BucketIndex growth );
1021 bool reserve( BucketIndex newItemCount );
1023 const Value *find(
const char *key )
const;
1025 Value *find(
const char *key );
1027 Value &resolveReference(
const char *key,
1030 void remove(
const char *key );
1032 void doActualRemove( ValueInternalLink *link,
1034 BucketIndex bucketIndex );
1036 ValueInternalLink *&getLastLinkInBucket( BucketIndex bucketIndex );
1038 Value &setNewItem(
const char *key,
1040 ValueInternalLink *link,
1041 BucketIndex index );
1043 Value &unsafeAdd(
const char *key,
1045 HashKey hashedKey );
1047 HashKey hash(
const char *key )
const;
1049 int compare(
const ValueInternalMap &other )
const;
1052 void makeBeginIterator( IteratorState &it )
const;
1053 void makeEndIterator( IteratorState &it )
const;
1054 static bool equals(
const IteratorState &x,
const IteratorState &other );
1055 static void increment( IteratorState &iterator );
1056 static void incrementBucket( IteratorState &iterator );
1057 static void decrement( IteratorState &iterator );
1058 static const char *key(
const IteratorState &iterator );
1059 static const char *key(
const IteratorState &iterator,
bool &isStatic );
1060 static Value &value(
const IteratorState &iterator );
1061 static int distance(
const IteratorState &x,
const IteratorState &y );
1064 ValueInternalLink *buckets_;
1065 ValueInternalLink *tailLink_;
1066 BucketIndex bucketsSize_;
1067 BucketIndex itemCount_;
1081 class JSON_API ValueInternalArray
1084 friend class ValueIteratorBase;
1086 enum { itemsPerPage = 8 };
1087 typedef Value::ArrayIndex ArrayIndex;
1088 typedef unsigned int PageIndex;
1090 # ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION 1091 struct IteratorState
1095 , currentPageIndex_(0)
1096 , currentItemIndex_(0)
1099 ValueInternalArray *array_;
1100 Value **currentPageIndex_;
1101 unsigned int currentItemIndex_;
1103 # endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION 1105 ValueInternalArray();
1106 ValueInternalArray(
const ValueInternalArray &other );
1107 ValueInternalArray &operator =(
const ValueInternalArray &other );
1108 ~ValueInternalArray();
1109 void swap( ValueInternalArray &other );
1112 void resize( ArrayIndex newSize );
1114 Value &resolveReference( ArrayIndex index );
1116 Value *find( ArrayIndex index )
const;
1118 ArrayIndex size()
const;
1120 int compare(
const ValueInternalArray &other )
const;
1123 static bool equals(
const IteratorState &x,
const IteratorState &other );
1124 static void increment( IteratorState &iterator );
1125 static void decrement( IteratorState &iterator );
1126 static Value &dereference(
const IteratorState &iterator );
1127 static Value &unsafeDereference(
const IteratorState &iterator );
1128 static int distance(
const IteratorState &x,
const IteratorState &y );
1129 static ArrayIndex indexOf(
const IteratorState &iterator );
1130 void makeBeginIterator( IteratorState &it )
const;
1131 void makeEndIterator( IteratorState &it )
const;
1132 void makeIterator( IteratorState &it, ArrayIndex index )
const;
1134 void makeIndexValid( ArrayIndex index );
1138 PageIndex pageCount_;
1200 class JSON_API ValueArrayAllocator
1203 virtual ~ValueArrayAllocator();
1204 virtual ValueInternalArray *newArray() = 0;
1205 virtual ValueInternalArray *newArrayCopy(
const ValueInternalArray &other ) = 0;
1206 virtual void destructArray( ValueInternalArray *array ) = 0;
1218 virtual void reallocateArrayPageIndex( Value **&indexes,
1219 ValueInternalArray::PageIndex &indexCount,
1220 ValueInternalArray::PageIndex minNewIndexCount ) = 0;
1221 virtual void releaseArrayPageIndex( Value **indexes,
1222 ValueInternalArray::PageIndex indexCount ) = 0;
1223 virtual Value *allocateArrayPage() = 0;
1224 virtual void releaseArrayPage( Value *value ) = 0;
1226 #endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP 1232 class ValueIteratorBase
1235 typedef unsigned int size_t;
1236 typedef int difference_type;
1237 typedef ValueIteratorBase SelfType;
1239 ValueIteratorBase();
1240 #ifndef JSON_VALUE_USE_INTERNAL_MAP 1241 explicit ValueIteratorBase(
const Value::ObjectValues::iterator ¤t );
1243 ValueIteratorBase(
const ValueInternalArray::IteratorState &state );
1244 ValueIteratorBase(
const ValueInternalMap::IteratorState &state );
1247 bool operator ==(
const SelfType &other )
const 1249 return isEqual( other );
1252 bool operator !=(
const SelfType &other )
const 1254 return !isEqual( other );
1257 difference_type operator -(
const SelfType &other )
const 1259 return computeDistance( other );
1269 const char *memberName()
const;
1272 Value &deref()
const;
1278 difference_type computeDistance(
const SelfType &other )
const;
1280 bool isEqual(
const SelfType &other )
const;
1282 void copy(
const SelfType &other );
1285 #ifndef JSON_VALUE_USE_INTERNAL_MAP 1286 Value::ObjectValues::iterator current_;
1292 ValueInternalArray::IteratorState array_;
1293 ValueInternalMap::IteratorState map_;
1302 class ValueConstIterator :
public ValueIteratorBase
1306 typedef unsigned int size_t;
1307 typedef int difference_type;
1308 typedef const Value &reference;
1309 typedef const Value *pointer;
1310 typedef ValueConstIterator SelfType;
1312 ValueConstIterator();
1316 #ifndef JSON_VALUE_USE_INTERNAL_MAP 1317 explicit ValueConstIterator(
const Value::ObjectValues::iterator ¤t );
1319 ValueConstIterator(
const ValueInternalArray::IteratorState &state );
1320 ValueConstIterator(
const ValueInternalMap::IteratorState &state );
1323 SelfType &operator =(
const ValueIteratorBase &other );
1325 SelfType operator++(
int )
1327 SelfType temp( *
this );
1332 SelfType operator--(
int )
1334 SelfType temp( *
this );
1339 SelfType &operator--()
1345 SelfType &operator++()
1351 reference operator *()
const 1360 class ValueIterator :
public ValueIteratorBase
1364 typedef unsigned int size_t;
1365 typedef int difference_type;
1366 typedef Value &reference;
1367 typedef Value *pointer;
1368 typedef ValueIterator SelfType;
1371 ValueIterator(
const ValueConstIterator &other );
1372 ValueIterator(
const ValueIterator &other );
1376 #ifndef JSON_VALUE_USE_INTERNAL_MAP 1377 explicit ValueIterator(
const Value::ObjectValues::iterator ¤t );
1379 ValueIterator(
const ValueInternalArray::IteratorState &state );
1380 ValueIterator(
const ValueInternalMap::IteratorState &state );
1384 SelfType &operator =(
const SelfType &other );
1386 SelfType operator++(
int )
1388 SelfType temp( *
this );
1393 SelfType operator--(
int )
1395 SelfType temp( *
this );
1400 SelfType &operator--()
1406 SelfType &operator++()
1412 reference operator *()
const 1422 #endif // CPPTL_JSON_H_INCLUDED 1442 #ifndef CPPTL_JSON_READER_H_INCLUDED 1443 # define CPPTL_JSON_READER_H_INCLUDED 1445 #if !defined(JSON_IS_AMALGAMATION) 1446 # include "features.h" 1448 #endif // if !defined(JSON_IS_AMALGAMATION) 1452 # include <iostream> 1459 class JSON_API Reader
1463 typedef const Char *Location;
1473 Reader(
const Features &features );
1485 bool parse(
const std::string &document,
1487 bool collectComments =
true );
1501 bool parse(
const char *beginDoc,
const char *endDoc,
1503 bool collectComments =
true );
1507 bool parse( std::istream &is,
1509 bool collectComments =
true );
1517 JSONCPP_DEPRECATED(
"Use getFormattedErrorMessages instead")
1518 std::string getFormatedErrorMessages()
const;
1525 std::string getFormattedErrorMessages()
const;
1530 tokenEndOfStream = 0,
1540 tokenArraySeparator,
1541 tokenMemberSeparator,
1558 std::string message_;
1562 typedef std::deque<ErrorInfo> Errors;
1564 bool expectToken( TokenType type, Token &token,
const char *message );
1565 bool readToken( Token &token );
1567 bool match( Location pattern,
1568 int patternLength );
1570 bool readCStyleComment();
1571 bool readCppStyleComment();
1575 bool readObject( Token &token );
1576 bool readArray( Token &token );
1577 bool decodeNumber( Token &token );
1578 bool decodeString( Token &token );
1579 bool decodeString( Token &token, std::string &decoded );
1580 bool decodeDouble( Token &token );
1581 bool decodeUnicodeCodePoint( Token &token,
1584 unsigned int &unicode );
1585 bool decodeUnicodeEscapeSequence( Token &token,
1588 unsigned int &unicode );
1589 bool addError(
const std::string &message,
1591 Location extra = 0 );
1592 bool recoverFromError( TokenType skipUntilToken );
1593 bool addErrorAndRecover(
const std::string &message,
1595 TokenType skipUntilToken );
1596 void skipUntilSpace();
1597 Value ¤tValue();
1599 void getLocationLineAndColumn( Location location,
1601 int &column )
const;
1602 std::string getLocationLineAndColumn( Location location )
const;
1603 void addComment( Location begin,
1606 void skipCommentTokens( Token &token );
1608 typedef std::stack<Value *> Nodes;
1611 std::string document_;
1615 Location lastValueEnd_;
1617 std::string commentsBefore_;
1619 bool collectComments_;
1646 std::istream&
operator>>( std::istream&, Value& );
1650 #endif // CPPTL_JSON_READER_H_INCLUDED 1670 #ifndef JSON_WRITER_H_INCLUDED 1671 # define JSON_WRITER_H_INCLUDED 1673 #if !defined(JSON_IS_AMALGAMATION) 1675 #endif // if !defined(JSON_IS_AMALGAMATION) 1678 # include <iostream> 1686 class JSON_API Writer
1691 virtual std::string write(
const Value &root ) = 0;
1700 class JSON_API FastWriter :
public Writer
1704 virtual ~FastWriter(){}
1706 void enableYAMLCompatibility();
1709 virtual std::string write(
const Value &root );
1712 void writeValue(
const Value &value );
1714 std::string document_;
1715 bool yamlCompatiblityEnabled_;
1736 class JSON_API StyledWriter:
public Writer
1740 virtual ~StyledWriter(){}
1747 virtual std::string write(
const Value &root );
1750 void writeValue(
const Value &value );
1751 void writeArrayValue(
const Value &value );
1752 bool isMultineArray(
const Value &value );
1753 void pushValue(
const std::string &value );
1755 void writeWithIndent(
const std::string &value );
1758 void writeCommentBeforeValue(
const Value &root );
1759 void writeCommentAfterValueOnSameLine(
const Value &root );
1760 bool hasCommentForValue(
const Value &value );
1761 static std::string normalizeEOL(
const std::string &text );
1763 typedef std::vector<std::string> ChildValues;
1765 ChildValues childValues_;
1766 std::string document_;
1767 std::string indentString_;
1770 bool addChildValues_;
1793 class JSON_API StyledStreamWriter
1796 StyledStreamWriter( std::string indentation=
"\t" );
1797 ~StyledStreamWriter(){}
1805 void write( std::ostream &out,
const Value &root );
1808 void writeValue(
const Value &value );
1809 void writeArrayValue(
const Value &value );
1810 bool isMultineArray(
const Value &value );
1811 void pushValue(
const std::string &value );
1813 void writeWithIndent(
const std::string &value );
1816 void writeCommentBeforeValue(
const Value &root );
1817 void writeCommentAfterValueOnSameLine(
const Value &root );
1818 bool hasCommentForValue(
const Value &value );
1819 static std::string normalizeEOL(
const std::string &text );
1821 typedef std::vector<std::string> ChildValues;
1823 ChildValues childValues_;
1824 std::ostream* document_;
1825 std::string indentString_;
1827 std::string indentation_;
1828 bool addChildValues_;
1831 # if defined(JSON_HAS_INT64) 1832 std::string JSON_API valueToString( Int value );
1833 std::string JSON_API valueToString( UInt value );
1834 # endif // if defined(JSON_HAS_INT64) 1835 std::string JSON_API valueToString( LargestInt value );
1836 std::string JSON_API valueToString( LargestUInt value );
1837 std::string JSON_API valueToString(
double value );
1838 std::string JSON_API valueToString(
bool value );
1839 std::string JSON_API valueToQuotedString(
const char *value );
1843 std::ostream&
operator<<( std::ostream&,
const Value &root );
1849 #endif // JSON_WRITER_H_INCLUDED 1859 #endif //ifndef JSON_AMALGATED_H_INCLUDED array value (ordered list)
Definition: json.h:357
unsigned integer value
Definition: json.h:353
object value (collection of name/value pairs).
Definition: json.h:358
std::istream & operator>>(std::istream &, Value &)
Read from 'sin' into 'root'.
Definition: jsoncpp.cpp:964
'null' value
Definition: json.h:351
CommentPlacement
Definition: json.h:361
JSON (JavaScript Object Notation).
Definition: json-forwards.h:162
double value
Definition: json.h:354
a comment on the line after a value (only make sense for root value)
Definition: json.h:365
ValueType
Type of the value held by a Value object.
Definition: json.h:349
bool value
Definition: json.h:356
signed integer value
Definition: json.h:352
a comment placed on the line before a value
Definition: json.h:363
UTF-8 string value.
Definition: json.h:355
a comment just after a value on the same line
Definition: json.h:364
std::ostream & operator<<(std::ostream &, const Value &root)
Output using the StyledStreamWriter.
Definition: jsoncpp.cpp:3829