75 #ifndef JSON_AMALGATED_H_INCLUDED 76 # define JSON_AMALGATED_H_INCLUDED 77 #define JSON_IS_AMALGAMATION 87 #ifndef JSON_VERSION_H_INCLUDED 88 # define JSON_VERSION_H_INCLUDED 90 # define JSONCPP_VERSION_STRING "1.7.0" 91 # define JSONCPP_VERSION_MAJOR 1 92 # define JSONCPP_VERSION_MINOR 7 93 # define JSONCPP_VERSION_PATCH 0 94 # define JSONCPP_VERSION_QUALIFIER 95 # define JSONCPP_VERSION_HEXA ((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | (JSONCPP_VERSION_PATCH << 8)) 97 #endif // JSON_VERSION_H_INCLUDED 117 #ifndef JSON_CONFIG_H_INCLUDED 118 #define JSON_CONFIG_H_INCLUDED 133 #ifndef JSON_USE_EXCEPTION 134 #define JSON_USE_EXCEPTION 1 143 #include <cpptl/config.h> 144 #ifndef JSON_USE_CPPTL 145 #define JSON_USE_CPPTL 1 150 #define JSON_API CPPTL_API 151 #elif defined(JSON_DLL_BUILD) 152 #if defined(_MSC_VER) 153 #define JSON_API __declspec(dllexport) 154 #define JSONCPP_DISABLE_DLL_INTERFACE_WARNING 155 #endif // if defined(_MSC_VER) 156 #elif defined(JSON_DLL) 157 #if defined(_MSC_VER) 158 #define JSON_API __declspec(dllimport) 159 #define JSONCPP_DISABLE_DLL_INTERFACE_WARNING 160 #endif // if defined(_MSC_VER) 161 #endif // ifdef JSON_IN_CPPTL 162 #if !defined(JSON_API) 171 #if defined(_MSC_VER) // MSVC 172 # if _MSC_VER <= 1200 // MSVC 6 175 # define JSON_USE_INT64_DOUBLE_CONVERSION 1 180 # pragma warning(disable : 4786) 183 # if _MSC_VER >= 1500 // MSVC 2008 184 # define JSONCPP_DEPRECATED(message) __declspec(deprecated(message)) 188 #endif // defined(_MSC_VER) 191 #ifndef JSON_HAS_RVALUE_REFERENCES 193 #if defined(_MSC_VER) && _MSC_VER >= 1600 // MSVC >= 2010 194 #define JSON_HAS_RVALUE_REFERENCES 1 195 #endif // MSVC >= 2010 198 #if __has_feature(cxx_rvalue_references) 199 #define JSON_HAS_RVALUE_REFERENCES 1 200 #endif // has_feature 202 #elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc) 203 #if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) 204 #define JSON_HAS_RVALUE_REFERENCES 1 205 #endif // GXX_EXPERIMENTAL 207 #endif // __clang__ || __GNUC__ 209 #endif // not defined JSON_HAS_RVALUE_REFERENCES 211 #ifndef JSON_HAS_RVALUE_REFERENCES 212 #define JSON_HAS_RVALUE_REFERENCES 0 216 #elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc) 217 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) 218 # define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message))) 219 # elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) 220 # define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__)) 221 # endif // GNUC version 222 #endif // __clang__ || __GNUC__ 224 #if !defined(JSONCPP_DEPRECATED) 225 #define JSONCPP_DEPRECATED(message) 226 #endif // if !defined(JSONCPP_DEPRECATED) 229 # define JSON_USE_INT64_DOUBLE_CONVERSION 1 234 typedef unsigned int UInt;
235 #if defined(JSON_NO_INT64) 236 typedef int LargestInt;
237 typedef unsigned int LargestUInt;
238 #undef JSON_HAS_INT64 239 #else // if defined(JSON_NO_INT64) 241 #if defined(_MSC_VER) // Microsoft Visual Studio 242 typedef __int64 Int64;
243 typedef unsigned __int64 UInt64;
244 #else // if defined(_MSC_VER) // Other platforms, use long long 245 typedef long long int Int64;
246 typedef unsigned long long int UInt64;
247 #endif // if defined(_MSC_VER) 248 typedef Int64 LargestInt;
249 typedef UInt64 LargestUInt;
250 #define JSON_HAS_INT64 251 #endif // if defined(JSON_NO_INT64) 254 #endif // JSON_CONFIG_H_INCLUDED 274 #ifndef JSON_FORWARDS_H_INCLUDED 275 #define JSON_FORWARDS_H_INCLUDED 277 #if !defined(JSON_IS_AMALGAMATION) 279 #endif // if !defined(JSON_IS_AMALGAMATION) 294 typedef unsigned int ArrayIndex;
305 #endif // JSON_FORWARDS_H_INCLUDED 325 #ifndef CPPTL_JSON_FEATURES_H_INCLUDED 326 #define CPPTL_JSON_FEATURES_H_INCLUDED 328 #if !defined(JSON_IS_AMALGAMATION) 329 #include "forwards.h" 330 #endif // if !defined(JSON_IS_AMALGAMATION) 376 #endif // CPPTL_JSON_FEATURES_H_INCLUDED 396 #ifndef CPPTL_JSON_H_INCLUDED 397 #define CPPTL_JSON_H_INCLUDED 399 #if !defined(JSON_IS_AMALGAMATION) 400 #include "forwards.h" 401 #endif // if !defined(JSON_IS_AMALGAMATION) 406 #ifndef JSON_USE_CPPTL_SMALLMAP 409 #include <cpptl/smallmap.h> 411 #ifdef JSON_USE_CPPTL 412 #include <cpptl/forwards.h> 417 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) 418 #pragma warning(push) 419 #pragma warning(disable : 4251) 420 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) 434 char const* what()
const throw()
override;
508 explicit StaticString(
const char* czstring) : c_str_(czstring) {}
510 operator const char*()
const {
return c_str_; }
512 const char* c_str()
const {
return c_str_; }
555 typedef std::vector<std::string> Members;
558 typedef Json::UInt UInt;
559 typedef Json::Int Int;
560 #if defined(JSON_HAS_INT64) 561 typedef Json::UInt64 UInt64;
562 typedef Json::Int64 Int64;
563 #endif // defined(JSON_HAS_INT64) 564 typedef Json::LargestInt LargestInt;
565 typedef Json::LargestUInt LargestUInt;
566 typedef Json::ArrayIndex ArrayIndex;
570 static const LargestInt minLargestInt;
584 #if defined(JSON_HAS_INT64) 585 static const Int64 minInt64;
591 #endif // defined(JSON_HAS_INT64) 594 #ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION 597 enum DuplicationPolicy {
602 CZString(ArrayIndex index);
603 CZString(
char const* str,
unsigned length, DuplicationPolicy allocate);
604 CZString(CZString
const& other);
605 #if JSON_HAS_RVALUE_REFERENCES 606 CZString(CZString&& other);
609 CZString& operator=(CZString other);
610 bool operator<(CZString
const& other)
const;
611 bool operator==(CZString
const& other)
const;
612 ArrayIndex index()
const;
614 char const* data()
const;
615 unsigned length()
const;
616 bool isStaticString()
const;
619 void swap(CZString& other);
621 struct StringStorage {
623 unsigned length_: 30;
629 StringStorage storage_;
634 #ifndef JSON_USE_CPPTL_SMALLMAP 635 typedef std::map<CZString, Value> ObjectValues;
637 typedef CppTL::SmallMap<CZString, Value> ObjectValues;
638 #endif // ifndef JSON_USE_CPPTL_SMALLMAP 639 #endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION 660 #if defined(JSON_HAS_INT64) 663 #endif // if defined(JSON_HAS_INT64) 665 Value(
const char* value);
666 Value(
const char* begin,
const char* end);
683 Value(
const std::string& value);
684 #ifdef JSON_USE_CPPTL 685 Value(
const CppTL::ConstString& value);
690 #if JSON_HAS_RVALUE_REFERENCES 700 void swap(
Value& other);
702 void swapPayload(
Value& other);
707 bool operator<(
const Value& other)
const;
708 bool operator<=(
const Value& other)
const;
709 bool operator>=(
const Value& other)
const;
710 bool operator>(
const Value& other)
const;
711 bool operator==(
const Value& other)
const;
712 bool operator!=(
const Value& other)
const;
713 int compare(
const Value& other)
const;
715 const char* asCString()
const;
716 std::string asString()
const;
721 char const** begin,
char const** end)
const;
722 #ifdef JSON_USE_CPPTL 723 CppTL::ConstString asConstString()
const;
727 #if defined(JSON_HAS_INT64) 728 Int64 asInt64()
const;
729 UInt64 asUInt64()
const;
730 #endif // if defined(JSON_HAS_INT64) 731 LargestInt asLargestInt()
const;
732 LargestUInt asLargestUInt()
const;
733 float asFloat()
const;
734 double asDouble()
const;
740 bool isInt64()
const;
742 bool isUInt64()
const;
743 bool isIntegral()
const;
744 bool isDouble()
const;
745 bool isNumeric()
const;
746 bool isString()
const;
747 bool isArray()
const;
748 bool isObject()
const;
750 bool isConvertibleTo(
ValueType other)
const;
753 ArrayIndex size()
const;
760 bool operator!()
const;
772 void resize(ArrayIndex size);
780 Value& operator[](ArrayIndex index);
788 Value& operator[](
int index);
793 const Value& operator[](ArrayIndex index)
const;
798 const Value& operator[](
int index)
const;
803 Value get(ArrayIndex index,
const Value& defaultValue)
const;
805 bool isValidIndex(ArrayIndex index)
const;
814 Value& operator[](
const char* key);
817 const Value& operator[](
const char* key)
const;
820 Value& operator[](
const std::string& key);
824 const Value& operator[](
const std::string& key)
const;
838 #ifdef JSON_USE_CPPTL 839 Value& operator[](
const CppTL::ConstString& key);
843 const Value& operator[](
const CppTL::ConstString& key)
const;
845 Value get(
const char* key,
const Value& defaultValue)
const;
851 Value get(
const char* begin,
const char* end,
const Value& defaultValue)
const;
855 Value get(
const std::string& key,
const Value& defaultValue)
const;
856 #ifdef JSON_USE_CPPTL 857 Value get(
const CppTL::ConstString& key,
const Value& defaultValue)
const;
861 Value const* find(
char const* begin,
char const* end)
const;
868 Value const* demand(
char const* begin,
char const* end);
876 Value removeMember(
const char* key);
880 Value removeMember(
const std::string& key);
883 bool removeMember(
const char* key,
Value* removed);
890 bool removeMember(std::string
const& key,
Value* removed);
892 bool removeMember(
const char* begin,
const char* end,
Value* removed);
899 bool removeIndex(ArrayIndex i,
Value* removed);
903 bool isMember(
const char* key)
const;
906 bool isMember(
const std::string& key)
const;
908 bool isMember(
const char* begin,
const char* end)
const;
909 #ifdef JSON_USE_CPPTL 910 bool isMember(
const CppTL::ConstString& key)
const;
919 Members getMemberNames()
const;
927 JSONCPP_DEPRECATED(
"Use setComment(std::string const&) instead.")
930 void setComment(
const char* comment,
size_t len,
CommentPlacement placement);
937 std::string toStyledString()
const;
939 const_iterator begin()
const;
940 const_iterator end()
const;
947 void setOffsetStart(ptrdiff_t start);
948 void setOffsetLimit(ptrdiff_t limit);
949 ptrdiff_t getOffsetStart()
const;
950 ptrdiff_t getOffsetLimit()
const;
953 void initBasic(
ValueType type,
bool allocated =
false);
955 Value& resolveReference(
const char* key);
956 Value& resolveReference(
const char* key,
const char* end);
962 void setComment(
const char* text,
size_t len);
985 unsigned int allocated_ : 1;
987 CommentInfo* comments_;
1031 Path(
const std::string& path,
1038 const Value& resolve(
const Value& root)
const;
1045 typedef std::vector<const PathArgument*> InArgs;
1046 typedef std::vector<PathArgument> Args;
1048 void makePath(
const std::string& path,
const InArgs& in);
1049 void addPathInArg(
const std::string& path,
1051 InArgs::const_iterator& itInArg,
1052 PathArgument::Kind kind);
1053 void invalidPath(
const std::string& path,
int location);
1063 typedef std::bidirectional_iterator_tag iterator_category;
1064 typedef unsigned int size_t;
1065 typedef int difference_type;
1068 bool operator==(
const SelfType& other)
const {
return isEqual(other); }
1070 bool operator!=(
const SelfType& other)
const {
return !isEqual(other); }
1072 difference_type operator-(
const SelfType& other)
const {
1073 return other.computeDistance(*
this);
1086 std::string name()
const;
1091 JSONCPP_DEPRECATED(
"Use `key = name();` instead.")
1092 char const* memberName()
const;
1096 char const* memberName(
char const** end)
const;
1099 Value& deref()
const;
1105 difference_type computeDistance(
const SelfType& other)
const;
1107 bool isEqual(
const SelfType& other)
const;
1109 void copy(
const SelfType& other);
1112 Value::ObjectValues::iterator current_;
1147 SelfType operator++(
int) {
1148 SelfType temp(*
this);
1153 SelfType operator--(
int) {
1154 SelfType temp(*
this);
1159 SelfType& operator--() {
1164 SelfType& operator++() {
1169 reference operator*()
const {
return deref(); }
1171 pointer operator->()
const {
return &deref(); }
1181 typedef unsigned int size_t;
1182 typedef int difference_type;
1194 explicit ValueIterator(
const Value::ObjectValues::iterator& current);
1196 SelfType& operator=(
const SelfType& other);
1198 SelfType operator++(
int) {
1199 SelfType temp(*
this);
1204 SelfType operator--(
int) {
1205 SelfType temp(*
this);
1210 SelfType& operator--() {
1215 SelfType& operator++() {
1220 reference operator*()
const {
return deref(); }
1222 pointer operator->()
const {
return &deref(); }
1235 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) 1236 #pragma warning(pop) 1237 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) 1239 #endif // CPPTL_JSON_H_INCLUDED 1259 #ifndef CPPTL_JSON_READER_H_INCLUDED 1260 #define CPPTL_JSON_READER_H_INCLUDED 1262 #if !defined(JSON_IS_AMALGAMATION) 1263 #include "features.h" 1265 #endif // if !defined(JSON_IS_AMALGAMATION) 1274 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) 1275 #pragma warning(push) 1276 #pragma warning(disable : 4251) 1277 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) 1289 typedef const Char* Location;
1298 ptrdiff_t offset_start;
1299 ptrdiff_t offset_limit;
1300 std::string message;
1328 parse(
const std::string& document,
Value& root,
bool collectComments =
true);
1348 bool parse(
const char* beginDoc,
1351 bool collectComments =
true);
1355 bool parse(std::istream& is,
Value& root,
bool collectComments =
true);
1366 JSONCPP_DEPRECATED(
"Use getFormattedErrorMessages() instead.")
1367 std::string getFormatedErrorMessages()
const;
1377 std::string getFormattedErrorMessages()
const;
1386 std::vector<StructuredError> getStructuredErrors()
const;
1394 bool pushError(
const Value& value,
const std::string& message);
1403 bool pushError(
const Value& value,
const std::string& message,
const Value& extra);
1413 tokenEndOfStream = 0,
1423 tokenArraySeparator,
1424 tokenMemberSeparator,
1439 std::string message_;
1443 typedef std::deque<ErrorInfo> Errors;
1445 bool readToken(Token& token);
1447 bool match(Location pattern,
int patternLength);
1449 bool readCStyleComment();
1450 bool readCppStyleComment();
1454 bool readObject(Token& token);
1455 bool readArray(Token& token);
1456 bool decodeNumber(Token& token);
1457 bool decodeNumber(Token& token,
Value& decoded);
1458 bool decodeString(Token& token);
1459 bool decodeString(Token& token, std::string& decoded);
1460 bool decodeDouble(Token& token);
1461 bool decodeDouble(Token& token,
Value& decoded);
1462 bool decodeUnicodeCodePoint(Token& token,
1465 unsigned int& unicode);
1466 bool decodeUnicodeEscapeSequence(Token& token,
1469 unsigned int& unicode);
1470 bool addError(
const std::string& message, Token& token, Location extra = 0);
1471 bool recoverFromError(TokenType skipUntilToken);
1472 bool addErrorAndRecover(
const std::string& message,
1474 TokenType skipUntilToken);
1475 void skipUntilSpace();
1476 Value& currentValue();
1479 getLocationLineAndColumn(Location location,
int& line,
int& column)
const;
1480 std::string getLocationLineAndColumn(Location location)
const;
1482 void skipCommentTokens(Token& token);
1484 typedef std::stack<Value*> Nodes;
1487 std::string document_;
1491 Location lastValueEnd_;
1493 std::string commentsBefore_;
1495 bool collectComments_;
1521 char const* beginDoc,
char const* endDoc,
1522 Value* root, std::string* errs) = 0;
1530 virtual CharReader* newCharReader()
const = 0;
1600 Value& operator[](std::string key);
1623 Value* root, std::string* errs);
1653 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) 1654 #pragma warning(pop) 1655 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) 1657 #endif // CPPTL_JSON_READER_H_INCLUDED 1677 #ifndef JSON_WRITER_H_INCLUDED 1678 #define JSON_WRITER_H_INCLUDED 1680 #if !defined(JSON_IS_AMALGAMATION) 1682 #endif // if !defined(JSON_IS_AMALGAMATION) 1689 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) 1690 #pragma warning(push) 1691 #pragma warning(disable : 4251) 1692 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) 1713 std::ostream* sout_;
1723 virtual int write(
Value const& root, std::ostream* sout) = 0;
1799 Value& operator[](std::string key);
1816 virtual std::string write(
const Value& root) = 0;
1834 void enableYAMLCompatibility();
1841 void dropNullPlaceholders();
1843 void omitEndingLineFeed();
1846 std::string write(
const Value& root)
override;
1849 void writeValue(
const Value& value);
1851 std::string document_;
1852 bool yamlCompatiblityEnabled_;
1853 bool dropNullPlaceholders_;
1854 bool omitEndingLineFeed_;
1891 std::string write(
const Value& root)
override;
1894 void writeValue(
const Value& value);
1895 void writeArrayValue(
const Value& value);
1896 bool isMultineArray(
const Value& value);
1897 void pushValue(
const std::string& value);
1899 void writeWithIndent(
const std::string& value);
1902 void writeCommentBeforeValue(
const Value& root);
1903 void writeCommentAfterValueOnSameLine(
const Value& root);
1904 bool hasCommentForValue(
const Value& value);
1905 static std::string normalizeEOL(
const std::string& text);
1907 typedef std::vector<std::string> ChildValues;
1909 ChildValues childValues_;
1910 std::string document_;
1911 std::string indentString_;
1912 unsigned int rightMargin_;
1913 unsigned int indentSize_;
1914 bool addChildValues_;
1955 void write(std::ostream& out,
const Value& root);
1958 void writeValue(
const Value& value);
1959 void writeArrayValue(
const Value& value);
1960 bool isMultineArray(
const Value& value);
1961 void pushValue(
const std::string& value);
1963 void writeWithIndent(
const std::string& value);
1966 void writeCommentBeforeValue(
const Value& root);
1967 void writeCommentAfterValueOnSameLine(
const Value& root);
1968 bool hasCommentForValue(
const Value& value);
1969 static std::string normalizeEOL(
const std::string& text);
1971 typedef std::vector<std::string> ChildValues;
1973 ChildValues childValues_;
1974 std::ostream* document_;
1975 std::string indentString_;
1976 unsigned int rightMargin_;
1977 std::string indentation_;
1978 bool addChildValues_ : 1;
1982 #if defined(JSON_HAS_INT64) 1983 std::string JSON_API valueToString(Int value);
1984 std::string JSON_API valueToString(UInt value);
1985 #endif // if defined(JSON_HAS_INT64) 1986 std::string JSON_API valueToString(LargestInt value);
1987 std::string JSON_API valueToString(LargestUInt value);
1988 std::string JSON_API valueToString(
double value);
1989 std::string JSON_API valueToString(
bool value);
1990 std::string JSON_API valueToQuotedString(
const char* value);
1998 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) 1999 #pragma warning(pop) 2000 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) 2002 #endif // JSON_WRITER_H_INCLUDED 2022 #ifndef CPPTL_JSON_ASSERTIONS_H_INCLUDED 2023 #define CPPTL_JSON_ASSERTIONS_H_INCLUDED 2028 #if !defined(JSON_IS_AMALGAMATION) 2030 #endif // if !defined(JSON_IS_AMALGAMATION) 2036 #if JSON_USE_EXCEPTION 2039 # define JSON_ASSERT(condition) \ 2040 {if (!(condition)) {Json::throwLogicError( "assert json failed" );}} 2042 # define JSON_FAIL_MESSAGE(message) \ 2044 std::ostringstream oss; oss << message; \ 2045 Json::throwLogicError(oss.str()); \ 2049 #else // JSON_USE_EXCEPTION 2051 # define JSON_ASSERT(condition) assert(condition) 2055 # define JSON_FAIL_MESSAGE(message) \ 2057 std::ostringstream oss; oss << message; \ 2058 assert(false && oss.str().c_str()); \ 2065 #define JSON_ASSERT_MESSAGE(condition, message) \ 2066 if (!(condition)) { \ 2067 JSON_FAIL_MESSAGE(message); \ 2070 #endif // CPPTL_JSON_ASSERTIONS_H_INCLUDED 2080 #endif //ifndef JSON_AMALGATED_H_INCLUDED Outputs a Value in JSON format without formatting (not human friendly).
Definition: json.h:1828
A simple abstract factory.
Definition: json.h:1727
Writes a Value in JSON format in a human friendly way.
Definition: json.h:1881
static const Int64 maxInt64
Maximum signed 64 bits int value that can be stored in a Json::Value.
Definition: json.h:588
static const Value & null
We regret this reference to a global instance; prefer the simpler Value().
Definition: json.h:568
base class for Value iterators.
Definition: json.h:1061
array value (ordered list)
Definition: json.h:475
bool JSON_API parseFromStream(CharReader::Factory const &, std::istream &, Value *root, std::string *errs)
Definition: jsoncpp.cpp:2196
unsigned integer value
Definition: json.h:471
Json::Value settings_
Definition: json.h:1586
void throwLogicError(std::string const &msg)
used internally
Definition: jsoncpp.cpp:2596
root value)
Definition: json.h:484
object value (collection of name/value pairs).
Definition: json.h:476
JSON_API std::istream & operator>>(std::istream &, Value &)
Read from 'sin' into 'root'.
Definition: jsoncpp.cpp:2210
static const Int maxInt
Maximum signed int value that can be stored in a Json::Value.
Definition: json.h:580
Lightweight wrapper to tag static string.
Definition: json.h:506
static const UInt maxUInt
Maximum unsigned int value that can be stored in a Json::Value.
Definition: json.h:582
An error tagged with where in the JSON text it was encountered.
Definition: json.h:1297
const iterator for object and array value.
Definition: json.h:1126
Experimental and untested: represents an element of the "path" to access a node.
Definition: json.h:998
'null' value
Definition: json.h:469
bool allowComments_
true if comments are allowed. Default: true.
Definition: json.h:361
CommentPlacement
Definition: json.h:479
static const Value & nullRef
Definition: json.h:569
bool allowNumericKeys_
true if numeric object key are allowed. Default: false.
Definition: json.h:371
JSON (JavaScript Object Notation).
Definition: json.h:232
bool allowDroppedNullPlaceholders_
true if dropped null placeholders are allowed. Default: false.
Definition: json.h:368
void swap(Value &other)
Swap everything.
Definition: jsoncpp.cpp:2902
Experimental and untested: represents a "path" to access a node.
Definition: json.h:1029
static const UInt64 maxUInt64
Maximum unsigned 64 bits int value that can be stored in a Json::Value.
Definition: json.h:590
double value
Definition: json.h:472
void throwRuntimeError(std::string const &msg)
used internally
Definition: jsoncpp.cpp:2592
Json::Value settings_
Definition: json.h:1783
Abstract class for writers.
Definition: json.h:1812
Represents a JSON value.
Definition: json.h:552
static const Int minInt
Minimum signed int value that can be stored in a Json::Value.
Definition: json.h:578
Unserialize a JSON document into a Value.
Definition: json.h:1286
Writes a Value in JSON format in a human friendly way, to a stream rather than to a string...
Definition: json.h:1943
Iterator for object and array value.
Definition: json.h:1176
ValueType
Type of the value held by a Value object.
Definition: json.h:468
bool strictRoot_
Definition: json.h:365
std::string JSON_API writeString(StreamWriter::Factory const &factory, Value const &root)
Write into stringstream, then return string, for convenience. A StreamWriter will be created from the...
Definition: jsoncpp.cpp:5180
bool value
Definition: json.h:474
signed integer value
Definition: json.h:470
Build a CharReader implementation.
Definition: json.h:1546
Configuration passed to reader and writer. This configuration object can be used to force the Reader ...
Definition: json.h:338
a comment placed on the line before a value
Definition: json.h:480
UTF-8 string value.
Definition: json.h:473
a comment just after a value on the same line
Definition: json.h:481
JSON_API std::ostream & operator<<(std::ostream &, const Value &root)
Output using the StyledStreamWriter.
Definition: jsoncpp.cpp:5187
Build a StreamWriter implementation.
Definition: json.h:1758
static const LargestInt maxLargestInt
Maximum signed integer value that can be stored in a Json::Value.
Definition: json.h:573
static const LargestUInt maxLargestUInt
Maximum unsigned integer value that can be stored in a Json::Value.
Definition: json.h:575