json.h
Go to the documentation of this file.
1 
4 // //////////////////////////////////////////////////////////////////////
5 // Beginning of content of file: LICENSE
6 // //////////////////////////////////////////////////////////////////////
7 
8 /*
9 The JsonCpp library's source code, including accompanying documentation,
10 tests and demonstration applications, are licensed under the following
11 conditions...
12 
13 The author (Baptiste Lepilleur) explicitly disclaims copyright in all
14 jurisdictions which recognize such a disclaimer. In such jurisdictions,
15 this software is released into the Public Domain.
16 
17 In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
18 2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is
19 released under the terms of the MIT License (see below).
20 
21 In jurisdictions which recognize Public Domain property, the user of this
22 software may choose to accept it either as 1) Public Domain, 2) under the
23 conditions of the MIT License (see below), or 3) under the terms of dual
24 Public Domain/MIT License conditions described here, as they choose.
25 
26 The MIT License is about as close to Public Domain as a license can get, and is
27 described in clear, concise terms at:
28 
29  http://en.wikipedia.org/wiki/MIT_License
30 
31 The full text of the MIT License follows:
32 
33 ========================================================================
34 Copyright (c) 2007-2010 Baptiste Lepilleur
35 
36 Permission is hereby granted, free of charge, to any person
37 obtaining a copy of this software and associated documentation
38 files (the "Software"), to deal in the Software without
39 restriction, including without limitation the rights to use, copy,
40 modify, merge, publish, distribute, sublicense, and/or sell copies
41 of the Software, and to permit persons to whom the Software is
42 furnished to do so, subject to the following conditions:
43 
44 The above copyright notice and this permission notice shall be
45 included in all copies or substantial portions of the Software.
46 
47 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
48 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
49 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
50 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
51 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
52 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
53 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
54 SOFTWARE.
55 ========================================================================
56 (END LICENSE TEXT)
57 
58 The MIT license is compatible with both the GPL and commercial
59 software, affording one all of the rights of Public Domain with the
60 minor nuisance of being required to keep the above copyright notice
61 and license text in the source code. Note also that by accepting the
62 Public Domain "license" you can re-license your copy using whatever
63 license you like.
64 
65 */
66 
67 // //////////////////////////////////////////////////////////////////////
68 // End of content of file: LICENSE
69 // //////////////////////////////////////////////////////////////////////
70 
71 
72 
73 
74 
75 #ifndef JSON_AMALGATED_H_INCLUDED
76 # define JSON_AMALGATED_H_INCLUDED
77 #define JSON_IS_AMALGAMATION
80 
81 // //////////////////////////////////////////////////////////////////////
82 // Beginning of content of file: include/json/version.h
83 // //////////////////////////////////////////////////////////////////////
84 
85 // DO NOT EDIT. This file is generated by CMake from "version"
86 // and "version.h.in" files.
87 // Run CMake configure step to update it.
88 #ifndef JSON_VERSION_H_INCLUDED
89 # define JSON_VERSION_H_INCLUDED
90 
91 # define JSONCPP_VERSION_STRING "1.6.2"
92 # define JSONCPP_VERSION_MAJOR 1
93 # define JSONCPP_VERSION_MINOR 6
94 # define JSONCPP_VERSION_PATCH 2
95 # define JSONCPP_VERSION_QUALIFIER
96 # define JSONCPP_VERSION_HEXA ((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | (JSONCPP_VERSION_PATCH << 8))
97 
98 #endif // JSON_VERSION_H_INCLUDED
99 
100 // //////////////////////////////////////////////////////////////////////
101 // End of content of file: include/json/version.h
102 // //////////////////////////////////////////////////////////////////////
103 
104 
105 
106 
107 
108 
109 // //////////////////////////////////////////////////////////////////////
110 // Beginning of content of file: include/json/config.h
111 // //////////////////////////////////////////////////////////////////////
112 
113 // Copyright 2007-2010 Baptiste Lepilleur
114 // Distributed under MIT license, or public domain if desired and
115 // recognized in your jurisdiction.
116 // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
117 
118 #ifndef JSON_CONFIG_H_INCLUDED
119 #define JSON_CONFIG_H_INCLUDED
120 
122 //# define JSON_IN_CPPTL 1
123 
125 //# define JSON_USE_CPPTL 1
129 //# define JSON_USE_CPPTL_SMALLMAP 1
130 
131 // If non-zero, the library uses exceptions to report bad input instead of C
132 // assertion macros. The default is to use exceptions.
133 #ifndef JSON_USE_EXCEPTION
134 #define JSON_USE_EXCEPTION 1
135 #endif
136 
140 // #define JSON_IS_AMALGAMATION
141 
142 #ifdef JSON_IN_CPPTL
143 #include <cpptl/config.h>
144 #ifndef JSON_USE_CPPTL
145 #define JSON_USE_CPPTL 1
146 #endif
147 #endif
148 
149 #ifdef JSON_IN_CPPTL
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)
163 #define JSON_API
164 #endif
165 
166 // If JSON_NO_INT64 is defined, then Json only support C++ "int" type for
167 // integer
168 // Storages, and 64 bits integer support is disabled.
169 // #define JSON_NO_INT64 1
170 
171 #if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6
172 // Microsoft Visual Studio 6 only support conversion from __int64 to double
173 // (no conversion from unsigned __int64).
174 #define JSON_USE_INT64_DOUBLE_CONVERSION 1
175 // Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255'
176 // characters in the debug information)
177 // All projects I've ever seen with VS6 were using this globally (not bothering
178 // with pragma push/pop).
179 #pragma warning(disable : 4786)
180 #endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6
181 
182 #if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008
183 #define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
185 #elif defined(__clang__) && defined(__has_feature)
186 #if __has_feature(attribute_deprecated_with_message)
187 #define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
188 #endif
189 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
190 #define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
191 #elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
192 #define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__))
193 #endif
194 
195 #if !defined(JSONCPP_DEPRECATED)
196 #define JSONCPP_DEPRECATED(message)
197 #endif // if !defined(JSONCPP_DEPRECATED)
198 
199 namespace Json {
200 typedef int Int;
201 typedef unsigned int UInt;
202 #if defined(JSON_NO_INT64)
203 typedef int LargestInt;
204 typedef unsigned int LargestUInt;
205 #undef JSON_HAS_INT64
206 #else // if defined(JSON_NO_INT64)
207 // For Microsoft Visual use specific types as long long is not supported
208 #if defined(_MSC_VER) // Microsoft Visual Studio
209 typedef __int64 Int64;
210 typedef unsigned __int64 UInt64;
211 #else // if defined(_MSC_VER) // Other platforms, use long long
212 typedef long long int Int64;
213 typedef unsigned long long int UInt64;
214 #endif // if defined(_MSC_VER)
215 typedef Int64 LargestInt;
216 typedef UInt64 LargestUInt;
217 #define JSON_HAS_INT64
218 #endif // if defined(JSON_NO_INT64)
219 } // end namespace Json
220 
221 #endif // JSON_CONFIG_H_INCLUDED
222 
223 // //////////////////////////////////////////////////////////////////////
224 // End of content of file: include/json/config.h
225 // //////////////////////////////////////////////////////////////////////
226 
227 
228 
229 
230 
231 
232 // //////////////////////////////////////////////////////////////////////
233 // Beginning of content of file: include/json/forwards.h
234 // //////////////////////////////////////////////////////////////////////
235 
236 // Copyright 2007-2010 Baptiste Lepilleur
237 // Distributed under MIT license, or public domain if desired and
238 // recognized in your jurisdiction.
239 // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
240 
241 #ifndef JSON_FORWARDS_H_INCLUDED
242 #define JSON_FORWARDS_H_INCLUDED
243 
244 #if !defined(JSON_IS_AMALGAMATION)
245 #include "config.h"
246 #endif // if !defined(JSON_IS_AMALGAMATION)
247 
248 namespace Json {
249 
250 // writer.h
251 class FastWriter;
252 class StyledWriter;
253 
254 // reader.h
255 class Reader;
256 
257 // features.h
258 class Features;
259 
260 // value.h
261 typedef unsigned int ArrayIndex;
262 class StaticString;
263 class Path;
264 class PathArgument;
265 class Value;
266 class ValueIteratorBase;
267 class ValueIterator;
268 class ValueConstIterator;
269 
270 } // namespace Json
271 
272 #endif // JSON_FORWARDS_H_INCLUDED
273 
274 // //////////////////////////////////////////////////////////////////////
275 // End of content of file: include/json/forwards.h
276 // //////////////////////////////////////////////////////////////////////
277 
278 
279 
280 
281 
282 
283 // //////////////////////////////////////////////////////////////////////
284 // Beginning of content of file: include/json/features.h
285 // //////////////////////////////////////////////////////////////////////
286 
287 // Copyright 2007-2010 Baptiste Lepilleur
288 // Distributed under MIT license, or public domain if desired and
289 // recognized in your jurisdiction.
290 // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
291 
292 #ifndef CPPTL_JSON_FEATURES_H_INCLUDED
293 #define CPPTL_JSON_FEATURES_H_INCLUDED
294 
295 #if !defined(JSON_IS_AMALGAMATION)
296 #include "forwards.h"
297 #endif // if !defined(JSON_IS_AMALGAMATION)
298 
299 namespace Json {
300 
306 public:
313  static Features all();
314 
321  static Features strictMode();
322 
325  Features();
326 
329 
333 
336 
339 };
340 
341 } // namespace Json
342 
343 #endif // CPPTL_JSON_FEATURES_H_INCLUDED
344 
345 // //////////////////////////////////////////////////////////////////////
346 // End of content of file: include/json/features.h
347 // //////////////////////////////////////////////////////////////////////
348 
349 
350 
351 
352 
353 
354 // //////////////////////////////////////////////////////////////////////
355 // Beginning of content of file: include/json/value.h
356 // //////////////////////////////////////////////////////////////////////
357 
358 // Copyright 2007-2010 Baptiste Lepilleur
359 // Distributed under MIT license, or public domain if desired and
360 // recognized in your jurisdiction.
361 // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
362 
363 #ifndef CPPTL_JSON_H_INCLUDED
364 #define CPPTL_JSON_H_INCLUDED
365 
366 #if !defined(JSON_IS_AMALGAMATION)
367 #include "forwards.h"
368 #endif // if !defined(JSON_IS_AMALGAMATION)
369 #include <string>
370 #include <vector>
371 #include <exception>
372 
373 #ifndef JSON_USE_CPPTL_SMALLMAP
374 #include <map>
375 #else
376 #include <cpptl/smallmap.h>
377 #endif
378 #ifdef JSON_USE_CPPTL
379 #include <cpptl/forwards.h>
380 #endif
381 
382 // Disable warning C4251: <data member>: <type> needs to have dll-interface to
383 // be used by...
384 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
385 #pragma warning(push)
386 #pragma warning(disable : 4251)
387 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
388 
391 namespace Json {
392 
412 
414 void throwRuntimeError(std::string const& msg);
416 void throwLogicError(std::string const& msg);
417 
420 enum ValueType {
421  nullValue = 0,
429 };
430 
437 };
438 
439 //# ifdef JSON_USE_CPPTL
440 // typedef CppTL::AnyEnumerator<const char *> EnumMemberNames;
441 // typedef CppTL::AnyEnumerator<const Value &> EnumValues;
442 //# endif
443 
459 public:
460  explicit StaticString(const char* czstring) : c_str_(czstring) {}
461 
462  operator const char*() const { return c_str_; }
463 
464  const char* c_str() const { return c_str_; }
465 
466 private:
467  const char* c_str_;
468 };
469 
505  friend class ValueIteratorBase;
506 public:
507  typedef std::vector<std::string> Members;
510  typedef Json::UInt UInt;
511  typedef Json::Int Int;
512 #if defined(JSON_HAS_INT64)
515 #endif // defined(JSON_HAS_INT64)
519 
520  static const Value& null;
521  static const Value& nullRef;
522  static const LargestInt minLargestInt;
525  static const LargestInt maxLargestInt;
528 
530  static const Int minInt;
532  static const Int maxInt;
534  static const UInt maxUInt;
535 
536 #if defined(JSON_HAS_INT64)
537  static const Int64 minInt64;
540  static const Int64 maxInt64;
542  static const UInt64 maxUInt64;
543 #endif // defined(JSON_HAS_INT64)
544 
545 private:
546 #ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
547  class CZString {
548  public:
550  noDuplication = 0,
552  duplicateOnCopy
553  };
554  CZString(ArrayIndex index);
555  CZString(char const* str, unsigned length, DuplicationPolicy allocate);
556  CZString(CZString const& other);
557  ~CZString();
558  CZString& operator=(CZString other);
559  bool operator<(CZString const& other) const;
560  bool operator==(CZString const& other) const;
561  ArrayIndex index() const;
562  //const char* c_str() const; ///< \deprecated
563  char const* data() const;
564  unsigned length() const;
565  bool isStaticString() const;
566 
567  private:
568  void swap(CZString& other);
569 
570  struct StringStorage {
571  unsigned policy_: 2;
572  unsigned length_: 30; // 1GB max
573  };
574 
575  char const* cstr_; // actually, a prefixed string, unless policy is noDup
576  union {
579  };
580  };
581 
582 public:
583 #ifndef JSON_USE_CPPTL_SMALLMAP
584  typedef std::map<CZString, Value> ObjectValues;
585 #else
586  typedef CppTL::SmallMap<CZString, Value> ObjectValues;
587 #endif // ifndef JSON_USE_CPPTL_SMALLMAP
588 #endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
589 
590 public:
606  Value(ValueType type = nullValue);
607  Value(Int value);
608  Value(UInt value);
609 #if defined(JSON_HAS_INT64)
610  Value(Int64 value);
611  Value(UInt64 value);
612 #endif // if defined(JSON_HAS_INT64)
613  Value(double value);
614  Value(const char* value);
615  Value(const char* beginValue, const char* endValue);
616 
631  Value(const StaticString& value);
632  Value(const std::string& value);
633 #ifdef JSON_USE_CPPTL
634  Value(const CppTL::ConstString& value);
635 #endif
636  Value(bool value);
638  Value(const Value& other);
639  ~Value();
640 
643  Value& operator=(Value other);
645  void swap(Value& other);
647  void swapPayload(Value& other);
648 
649  ValueType type() const;
650 
652  bool operator<(const Value& other) const;
653  bool operator<=(const Value& other) const;
654  bool operator>=(const Value& other) const;
655  bool operator>(const Value& other) const;
656  bool operator==(const Value& other) const;
657  bool operator!=(const Value& other) const;
658  int compare(const Value& other) const;
659 
660  const char* asCString() const;
661  std::string asString() const;
662 
665  bool getString(
666  char const** str, char const** end) const;
667 #ifdef JSON_USE_CPPTL
668  CppTL::ConstString asConstString() const;
669 #endif
670  Int asInt() const;
671  UInt asUInt() const;
672 #if defined(JSON_HAS_INT64)
673  Int64 asInt64() const;
674  UInt64 asUInt64() const;
675 #endif // if defined(JSON_HAS_INT64)
676  LargestInt asLargestInt() const;
677  LargestUInt asLargestUInt() const;
678  float asFloat() const;
679  double asDouble() const;
680  bool asBool() const;
681 
682  bool isNull() const;
683  bool isBool() const;
684  bool isInt() const;
685  bool isInt64() const;
686  bool isUInt() const;
687  bool isUInt64() const;
688  bool isIntegral() const;
689  bool isDouble() const;
690  bool isNumeric() const;
691  bool isString() const;
692  bool isArray() const;
693  bool isObject() const;
694 
695  bool isConvertibleTo(ValueType other) const;
696 
698  ArrayIndex size() const;
699 
702  bool empty() const;
703 
705  bool operator!() const;
706 
710  void clear();
711 
717  void resize(ArrayIndex size);
718 
725  Value& operator[](ArrayIndex index);
726 
733  Value& operator[](int index);
734 
738  const Value& operator[](ArrayIndex index) const;
739 
743  const Value& operator[](int index) const;
744 
748  Value get(ArrayIndex index, const Value& defaultValue) const;
750  bool isValidIndex(ArrayIndex index) const;
754  Value& append(const Value& value);
755 
759  Value& operator[](const char* key);
762  const Value& operator[](const char* key) const;
765  Value& operator[](const std::string& key);
769  const Value& operator[](const std::string& key) const;
782  Value& operator[](const StaticString& key);
783 #ifdef JSON_USE_CPPTL
784  Value& operator[](const CppTL::ConstString& key);
788  const Value& operator[](const CppTL::ConstString& key) const;
789 #endif
790  Value get(const char* key, const Value& defaultValue) const;
796  Value get(const char* key, const char* end, const Value& defaultValue) const;
800  Value get(const std::string& key, const Value& defaultValue) const;
801 #ifdef JSON_USE_CPPTL
802  Value get(const CppTL::ConstString& key, const Value& defaultValue) const;
805 #endif
806  Value const* find(char const* key, char const* end) const;
813  Value const* demand(char const* key, char const* end);
821  Value removeMember(const char* key);
825  Value removeMember(const std::string& key);
828  bool removeMember(const char* key, Value* removed);
835  bool removeMember(std::string const& key, Value* removed);
837  bool removeMember(const char* key, const char* end, Value* removed);
844  bool removeIndex(ArrayIndex i, Value* removed);
845 
848  bool isMember(const char* key) const;
851  bool isMember(const std::string& key) const;
853  bool isMember(const char* key, const char* end) const;
854 #ifdef JSON_USE_CPPTL
855  bool isMember(const CppTL::ConstString& key) const;
857 #endif
858 
864  Members getMemberNames() const;
865 
866  //# ifdef JSON_USE_CPPTL
867  // EnumMemberNames enumMemberNames() const;
868  // EnumValues enumValues() const;
869  //# endif
870 
872  JSONCPP_DEPRECATED("Use setComment(std::string const&) instead.")
873  void setComment(const char* comment, CommentPlacement placement);
875  void setComment(const char* comment, size_t len, CommentPlacement placement);
877  void setComment(const std::string& comment, CommentPlacement placement);
878  bool hasComment(CommentPlacement placement) const;
880  std::string getComment(CommentPlacement placement) const;
881 
882  std::string toStyledString() const;
883 
884  const_iterator begin() const;
885  const_iterator end() const;
886 
887  iterator begin();
888  iterator end();
889 
890  // Accessors for the [start, limit) range of bytes within the JSON text from
891  // which this value was parsed, if any.
892  void setOffsetStart(size_t start);
893  void setOffsetLimit(size_t limit);
894  size_t getOffsetStart() const;
895  size_t getOffsetLimit() const;
896 
897 private:
898  void initBasic(ValueType type, bool allocated = false);
899 
900  Value& resolveReference(const char* key);
901  Value& resolveReference(const char* key, const char* end);
902 
903  struct CommentInfo {
904  CommentInfo();
905  ~CommentInfo();
906 
907  void setComment(const char* text, size_t len);
908 
909  char* comment_;
910  };
911 
912  // struct MemberNamesTransform
913  //{
914  // typedef const char *result_type;
915  // const char *operator()( const CZString &name ) const
916  // {
917  // return name.c_str();
918  // }
919  //};
920 
921  union ValueHolder {
924  double real_;
925  bool bool_;
926  char* string_; // actually ptr to unsigned, followed by str, unless !allocated_
928  } value_;
929  ValueType type_ : 8;
930  unsigned int allocated_ : 1; // Notes: if declared as bool, bitfield is useless.
931  // If not allocated_, string_ must be null-terminated.
933 
934  // [start, limit) byte offsets in the source JSON text from which this Value
935  // was extracted.
936  size_t start_;
937  size_t limit_;
938 };
939 
944 public:
945  friend class Path;
946 
947  PathArgument();
948  PathArgument(ArrayIndex index);
949  PathArgument(const char* key);
950  PathArgument(const std::string& key);
951 
952 private:
953  enum Kind {
954  kindNone = 0,
956  kindKey
957  };
958  std::string key_;
961 };
962 
974 class JSON_API Path {
975 public:
976  Path(const std::string& path,
977  const PathArgument& a1 = PathArgument(),
978  const PathArgument& a2 = PathArgument(),
979  const PathArgument& a3 = PathArgument(),
980  const PathArgument& a4 = PathArgument(),
981  const PathArgument& a5 = PathArgument());
982 
983  const Value& resolve(const Value& root) const;
984  Value resolve(const Value& root, const Value& defaultValue) const;
987  Value& make(Value& root) const;
988 
989 private:
990  typedef std::vector<const PathArgument*> InArgs;
991  typedef std::vector<PathArgument> Args;
992 
993  void makePath(const std::string& path, const InArgs& in);
994  void addPathInArg(const std::string& path,
995  const InArgs& in,
996  InArgs::const_iterator& itInArg,
997  PathArgument::Kind kind);
998  void invalidPath(const std::string& path, int location);
999 
1001 };
1002 
1007 public:
1008  typedef std::bidirectional_iterator_tag iterator_category;
1009  typedef unsigned int size_t;
1010  typedef int difference_type;
1012 
1013  bool operator==(const SelfType& other) const { return isEqual(other); }
1014 
1015  bool operator!=(const SelfType& other) const { return !isEqual(other); }
1016 
1017  difference_type operator-(const SelfType& other) const {
1018  return other.computeDistance(*this);
1019  }
1020 
1023  Value key() const;
1024 
1026  UInt index() const;
1027 
1031  std::string name() const;
1032 
1036  JSONCPP_DEPRECATED("Use `key = name();` instead.")
1037  char const* memberName() const;
1041  char const* memberName(char const** end) const;
1042 
1043 protected:
1044  Value& deref() const;
1045 
1046  void increment();
1047 
1048  void decrement();
1049 
1050  difference_type computeDistance(const SelfType& other) const;
1051 
1052  bool isEqual(const SelfType& other) const;
1053 
1054  void copy(const SelfType& other);
1055 
1056 private:
1057  Value::ObjectValues::iterator current_;
1058  // Indicates that iterator is for a null value.
1059  bool isNull_;
1060 
1061 public:
1062  // For some reason, BORLAND needs these at the end, rather
1063  // than earlier. No idea why.
1065  explicit ValueIteratorBase(const Value::ObjectValues::iterator& current);
1066 };
1067 
1071 class JSON_API ValueConstIterator : public ValueIteratorBase {
1072  friend class Value;
1073 
1074 public:
1075  typedef const Value value_type;
1076  //typedef unsigned int size_t;
1077  //typedef int difference_type;
1078  typedef const Value& reference;
1079  typedef const Value* pointer;
1081 
1083 
1084 private:
1087  explicit ValueConstIterator(const Value::ObjectValues::iterator& current);
1088 public:
1089  SelfType& operator=(const ValueIteratorBase& other);
1090 
1091  SelfType operator++(int) {
1092  SelfType temp(*this);
1093  ++*this;
1094  return temp;
1095  }
1096 
1097  SelfType operator--(int) {
1098  SelfType temp(*this);
1099  --*this;
1100  return temp;
1101  }
1102 
1103  SelfType& operator--() {
1104  decrement();
1105  return *this;
1106  }
1107 
1108  SelfType& operator++() {
1109  increment();
1110  return *this;
1111  }
1112 
1113  reference operator*() const { return deref(); }
1114 
1115  pointer operator->() const { return &deref(); }
1116 };
1117 
1121  friend class Value;
1122 
1123 public:
1125  typedef unsigned int size_t;
1126  typedef int difference_type;
1127  typedef Value& reference;
1128  typedef Value* pointer;
1130 
1131  ValueIterator();
1132  ValueIterator(const ValueConstIterator& other);
1133  ValueIterator(const ValueIterator& other);
1134 
1135 private:
1138  explicit ValueIterator(const Value::ObjectValues::iterator& current);
1139 public:
1140  SelfType& operator=(const SelfType& other);
1141 
1143  SelfType temp(*this);
1144  ++*this;
1145  return temp;
1146  }
1147 
1149  SelfType temp(*this);
1150  --*this;
1151  return temp;
1152  }
1153 
1155  decrement();
1156  return *this;
1157  }
1158 
1160  increment();
1161  return *this;
1162  }
1163 
1164  reference operator*() const { return deref(); }
1165 
1166  pointer operator->() const { return &deref(); }
1167 };
1168 
1169 } // namespace Json
1170 
1171 
1172 namespace std {
1174 template<>
1175 inline void swap(Json::Value& a, Json::Value& b) { a.swap(b); }
1176 }
1177 
1178 
1179 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
1180 #pragma warning(pop)
1181 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
1182 
1183 #endif // CPPTL_JSON_H_INCLUDED
1184 
1185 // //////////////////////////////////////////////////////////////////////
1186 // End of content of file: include/json/value.h
1187 // //////////////////////////////////////////////////////////////////////
1188 
1189 
1190 
1191 
1192 
1193 
1194 // //////////////////////////////////////////////////////////////////////
1195 // Beginning of content of file: include/json/reader.h
1196 // //////////////////////////////////////////////////////////////////////
1197 
1198 // Copyright 2007-2010 Baptiste Lepilleur
1199 // Distributed under MIT license, or public domain if desired and
1200 // recognized in your jurisdiction.
1201 // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
1202 
1203 #ifndef CPPTL_JSON_READER_H_INCLUDED
1204 #define CPPTL_JSON_READER_H_INCLUDED
1205 
1206 #if !defined(JSON_IS_AMALGAMATION)
1207 #include "features.h"
1208 #include "value.h"
1209 #endif // if !defined(JSON_IS_AMALGAMATION)
1210 #include <deque>
1211 #include <iosfwd>
1212 #include <stack>
1213 #include <string>
1214 #include <istream>
1215 
1216 // Disable warning C4251: <data member>: <type> needs to have dll-interface to
1217 // be used by...
1218 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
1219 #pragma warning(push)
1220 #pragma warning(disable : 4251)
1221 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
1222 
1223 namespace Json {
1224 
1231 public:
1232  typedef char Char;
1233  typedef const Char* Location;
1234 
1244  std::string message;
1245  };
1246 
1250  Reader();
1251 
1255  Reader(const Features& features);
1256 
1271  bool
1272  parse(const std::string& document, Value& root, bool collectComments = true);
1273 
1292  bool parse(const char* beginDoc,
1293  const char* endDoc,
1294  Value& root,
1295  bool collectComments = true);
1296 
1299  bool parse(std::istream& is, Value& root, bool collectComments = true);
1300 
1310  JSONCPP_DEPRECATED("Use getFormattedErrorMessages() instead.")
1311  std::string getFormatedErrorMessages() const;
1312 
1321  std::string getFormattedErrorMessages() const;
1322 
1330  std::vector<StructuredError> getStructuredErrors() const;
1331 
1338  bool pushError(const Value& value, const std::string& message);
1339 
1347  bool pushError(const Value& value, const std::string& message, const Value& extra);
1348 
1353  bool good() const;
1354 
1355 private:
1356  enum TokenType {
1357  tokenEndOfStream = 0,
1370  tokenError
1371  };
1372 
1373  class Token {
1374  public:
1378  };
1379 
1380  class ErrorInfo {
1381  public:
1383  std::string message_;
1385  };
1386 
1387  typedef std::deque<ErrorInfo> Errors;
1388 
1389  bool readToken(Token& token);
1390  void skipSpaces();
1391  bool match(Location pattern, int patternLength);
1392  bool readComment();
1393  bool readCStyleComment();
1394  bool readCppStyleComment();
1395  bool readString();
1396  void readNumber();
1397  bool readValue();
1398  bool readObject(Token& token);
1399  bool readArray(Token& token);
1400  bool decodeNumber(Token& token);
1401  bool decodeNumber(Token& token, Value& decoded);
1402  bool decodeString(Token& token);
1403  bool decodeString(Token& token, std::string& decoded);
1404  bool decodeDouble(Token& token);
1405  bool decodeDouble(Token& token, Value& decoded);
1406  bool decodeUnicodeCodePoint(Token& token,
1407  Location& current,
1408  Location end,
1409  unsigned int& unicode);
1410  bool decodeUnicodeEscapeSequence(Token& token,
1411  Location& current,
1412  Location end,
1413  unsigned int& unicode);
1414  bool addError(const std::string& message, Token& token, Location extra = 0);
1415  bool recoverFromError(TokenType skipUntilToken);
1416  bool addErrorAndRecover(const std::string& message,
1417  Token& token,
1418  TokenType skipUntilToken);
1419  void skipUntilSpace();
1420  Value& currentValue();
1421  Char getNextChar();
1422  void
1423  getLocationLineAndColumn(Location location, int& line, int& column) const;
1424  std::string getLocationLineAndColumn(Location location) const;
1425  void addComment(Location begin, Location end, CommentPlacement placement);
1426  void skipCommentTokens(Token& token);
1427 
1428  typedef std::stack<Value*> Nodes;
1431  std::string document_;
1437  std::string commentsBefore_;
1440 }; // Reader
1441 
1445 public:
1446  virtual ~CharReader() {}
1464  virtual bool parse(
1465  char const* beginDoc, char const* endDoc,
1466  Value* root, std::string* errs) = 0;
1467 
1468  class Factory {
1469  public:
1470  virtual ~Factory() {}
1474  virtual CharReader* newCharReader() const = 0;
1475  }; // Factory
1476 }; // CharReader
1477 
1491 public:
1492  // Note: We use a Json::Value so that we can add data-members to this class
1493  // without a major version bump.
1528 
1530  virtual ~CharReaderBuilder();
1531 
1532  virtual CharReader* newCharReader() const;
1533 
1537  bool validate(Json::Value* invalid) const;
1538 
1541  Value& operator[](std::string key);
1542 
1548  static void setDefaults(Json::Value* settings);
1554  static void strictMode(Json::Value* settings);
1555 };
1556 
1562  CharReader::Factory const&,
1563  std::istream&,
1564  Value* root, std::string* errs);
1565 
1590 JSON_API std::istream& operator>>(std::istream&, Value&);
1591 
1592 } // namespace Json
1593 
1594 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
1595 #pragma warning(pop)
1596 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
1597 
1598 #endif // CPPTL_JSON_READER_H_INCLUDED
1599 
1600 // //////////////////////////////////////////////////////////////////////
1601 // End of content of file: include/json/reader.h
1602 // //////////////////////////////////////////////////////////////////////
1603 
1604 
1605 
1606 
1607 
1608 
1609 // //////////////////////////////////////////////////////////////////////
1610 // Beginning of content of file: include/json/writer.h
1611 // //////////////////////////////////////////////////////////////////////
1612 
1613 // Copyright 2007-2010 Baptiste Lepilleur
1614 // Distributed under MIT license, or public domain if desired and
1615 // recognized in your jurisdiction.
1616 // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
1617 
1618 #ifndef JSON_WRITER_H_INCLUDED
1619 #define JSON_WRITER_H_INCLUDED
1620 
1621 #if !defined(JSON_IS_AMALGAMATION)
1622 #include "value.h"
1623 #endif // if !defined(JSON_IS_AMALGAMATION)
1624 #include <vector>
1625 #include <string>
1626 #include <ostream>
1627 
1628 // Disable warning C4251: <data member>: <type> needs to have dll-interface to
1629 // be used by...
1630 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
1631 #pragma warning(push)
1632 #pragma warning(disable : 4251)
1633 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
1634 
1635 namespace Json {
1636 
1637 class Value;
1638 
1653 protected:
1654  std::ostream* sout_; // not owned; will not delete
1655 public:
1656  StreamWriter();
1657  virtual ~StreamWriter();
1664  virtual int write(Value const& root, std::ostream* sout) = 0;
1665 
1669  public:
1670  virtual ~Factory();
1674  virtual StreamWriter* newStreamWriter() const = 0;
1675  }; // Factory
1676 }; // StreamWriter
1677 
1681 std::string JSON_API writeString(StreamWriter::Factory const& factory, Value const& root);
1682 
1683 
1700 public:
1701  // Note: We use a Json::Value so that we can add data-members to this class
1702  // without a major version bump.
1721 
1723  virtual ~StreamWriterBuilder();
1724 
1728  virtual StreamWriter* newStreamWriter() const;
1729 
1733  bool validate(Json::Value* invalid) const;
1736  Value& operator[](std::string key);
1737 
1743  static void setDefaults(Json::Value* settings);
1744 };
1745 
1750 public:
1751  virtual ~Writer();
1752 
1753  virtual std::string write(const Value& root) = 0;
1754 };
1755 
1765 class JSON_API FastWriter : public Writer {
1766 
1767 public:
1768  FastWriter();
1769  virtual ~FastWriter() {}
1770 
1771  void enableYAMLCompatibility();
1772 
1778  void dropNullPlaceholders();
1779 
1780  void omitEndingLineFeed();
1781 
1782 public: // overridden from Writer
1783  virtual std::string write(const Value& root);
1784 
1785 private:
1786  void writeValue(const Value& value);
1787 
1788  std::string document_;
1792 };
1793 
1818 class JSON_API StyledWriter : public Writer {
1819 public:
1820  StyledWriter();
1821  virtual ~StyledWriter() {}
1822 
1823 public: // overridden from Writer
1828  virtual std::string write(const Value& root);
1829 
1830 private:
1831  void writeValue(const Value& value);
1832  void writeArrayValue(const Value& value);
1833  bool isMultineArray(const Value& value);
1834  void pushValue(const std::string& value);
1835  void writeIndent();
1836  void writeWithIndent(const std::string& value);
1837  void indent();
1838  void unindent();
1839  void writeCommentBeforeValue(const Value& root);
1840  void writeCommentAfterValueOnSameLine(const Value& root);
1841  bool hasCommentForValue(const Value& value);
1842  static std::string normalizeEOL(const std::string& text);
1843 
1844  typedef std::vector<std::string> ChildValues;
1845 
1847  std::string document_;
1848  std::string indentString_;
1852 };
1853 
1881 public:
1882  StyledStreamWriter(std::string indentation = "\t");
1884 
1885 public:
1892  void write(std::ostream& out, const Value& root);
1893 
1894 private:
1895  void writeValue(const Value& value);
1896  void writeArrayValue(const Value& value);
1897  bool isMultineArray(const Value& value);
1898  void pushValue(const std::string& value);
1899  void writeIndent();
1900  void writeWithIndent(const std::string& value);
1901  void indent();
1902  void unindent();
1903  void writeCommentBeforeValue(const Value& root);
1904  void writeCommentAfterValueOnSameLine(const Value& root);
1905  bool hasCommentForValue(const Value& value);
1906  static std::string normalizeEOL(const std::string& text);
1907 
1908  typedef std::vector<std::string> ChildValues;
1909 
1911  std::ostream* document_;
1912  std::string indentString_;
1914  std::string indentation_;
1915  bool addChildValues_ : 1;
1916  bool indented_ : 1;
1917 };
1918 
1919 #if defined(JSON_HAS_INT64)
1920 std::string JSON_API valueToString(Int value);
1921 std::string JSON_API valueToString(UInt value);
1922 #endif // if defined(JSON_HAS_INT64)
1923 std::string JSON_API valueToString(LargestInt value);
1924 std::string JSON_API valueToString(LargestUInt value);
1925 std::string JSON_API valueToString(double value);
1926 std::string JSON_API valueToString(bool value);
1927 std::string JSON_API valueToQuotedString(const char* value);
1928 
1931 JSON_API std::ostream& operator<<(std::ostream&, const Value& root);
1932 
1933 } // namespace Json
1934 
1935 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
1936 #pragma warning(pop)
1937 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
1938 
1939 #endif // JSON_WRITER_H_INCLUDED
1940 
1941 // //////////////////////////////////////////////////////////////////////
1942 // End of content of file: include/json/writer.h
1943 // //////////////////////////////////////////////////////////////////////
1944 
1945 
1946 
1947 
1948 
1949 
1950 // //////////////////////////////////////////////////////////////////////
1951 // Beginning of content of file: include/json/assertions.h
1952 // //////////////////////////////////////////////////////////////////////
1953 
1954 // Copyright 2007-2010 Baptiste Lepilleur
1955 // Distributed under MIT license, or public domain if desired and
1956 // recognized in your jurisdiction.
1957 // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
1958 
1959 #ifndef CPPTL_JSON_ASSERTIONS_H_INCLUDED
1960 #define CPPTL_JSON_ASSERTIONS_H_INCLUDED
1961 
1962 #include <stdlib.h>
1963 #include <sstream>
1964 
1965 #if !defined(JSON_IS_AMALGAMATION)
1966 #include "config.h"
1967 #endif // if !defined(JSON_IS_AMALGAMATION)
1968 
1973 #if JSON_USE_EXCEPTION
1974 
1975 // @todo <= add detail about condition in exception
1976 # define JSON_ASSERT(condition) \
1977  {if (!(condition)) {Json::throwLogicError( "assert json failed" );}}
1978 
1979 # define JSON_FAIL_MESSAGE(message) \
1980  { \
1981  std::ostringstream oss; oss << message; \
1982  Json::throwLogicError(oss.str()); \
1983  abort(); \
1984  }
1985 
1986 #else // JSON_USE_EXCEPTION
1987 
1988 # define JSON_ASSERT(condition) assert(condition)
1989 
1990 // The call to assert() will show the failure message in debug builds. In
1991 // release builds we abort, for a core-dump or debugger.
1992 # define JSON_FAIL_MESSAGE(message) \
1993  { \
1994  std::ostringstream oss; oss << message; \
1995  assert(false && oss.str().c_str()); \
1996  abort(); \
1997  }
1998 
1999 
2000 #endif
2001 
2002 #define JSON_ASSERT_MESSAGE(condition, message) \
2003  if (!(condition)) { \
2004  JSON_FAIL_MESSAGE(message); \
2005  }
2006 
2007 #endif // CPPTL_JSON_ASSERTIONS_H_INCLUDED
2008 
2009 // //////////////////////////////////////////////////////////////////////
2010 // End of content of file: include/json/assertions.h
2011 // //////////////////////////////////////////////////////////////////////
2012 
2013 
2014 
2015 
2016 
2017 #endif //ifndef JSON_AMALGATED_H_INCLUDED
unsigned int UInt
unsigned integer value
Definition: json.h:423
std::vector< std::string > ChildValues
Definition: json.h:1844
std::vector< std::string > Members
Definition: json.h:507
std::ostream * document_
Definition: json.h:1911
LargestInt int_
Definition: json.h:922
double value
Definition: json.h:424
bool allowNumericKeys_
true if numeric object key are allowed. Default: false.
Definition: json.h:338
std::string JSON_API valueToQuotedString(const char *value)
Definition: jsoncpp.cpp:4081
Location current_
Definition: json.h:1434
Json::Value settings_
Definition: json.h:1527
ValueIterator iterator
Definition: json.h:508
JSON_API std::ostream & operator<<(std::ostream &, const Value &root)
Output using the StyledStreamWriter.
Definition: jsoncpp.cpp:5106
SelfType operator--(int)
Definition: json.h:1097
bool allowComments_
true if comments are allowed. Default: true.
Definition: json.h:328
#define JSON_API
Definition: json.h:163
Writes a Value in JSON format in a human friendly way, to a stream rather than to a string...
Definition: json.h:1880
Json::LargestInt LargestInt
Definition: json.h:516
bool omitEndingLineFeed_
Definition: json.h:1791
bool dropNullPlaceholders_
Definition: json.h:1790
signed integer value
Definition: json.h:422
static const LargestUInt maxLargestUInt
Maximum unsigned integer value that can be stored in a Json::Value.
Definition: json.h:527
char Char
Definition: json.h:1232
StringStorage storage_
Definition: json.h:578
std::ostream * sout_
Definition: json.h:1654
UInt64 LargestUInt
pointer operator->() const
Definition: json.h:1166
std::string indentString_
Definition: json.h:1848
Json::Int Int
Definition: json.h:511
ArrayIndex index_
Definition: json.h:577
Experimental and untested: represents an element of the "path" to access a node.
Definition: json.h:943
Json::ArrayIndex ArrayIndex
Definition: json.h:518
SelfType & operator++()
Definition: json.h:1108
std::string commentsBefore_
Definition: json.h:1437
Lightweight wrapper to tag static string.
Definition: json.h:458
ValueConstIterator const_iterator
Definition: json.h:509
bool yamlCompatiblityEnabled_
Definition: json.h:1789
std::string document_
Definition: json.h:1788
std::stack< Value * > Nodes
Definition: json.h:1428
LargestUInt uint_
Definition: json.h:923
TokenType type_
Definition: json.h:1375
bool collectComments_
Definition: json.h:1439
unsigned int ArrayIndex
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:5099
ObjectValues * map_
Definition: json.h:927
const Value & reference
Definition: json.h:1078
static const UInt maxUInt
Maximum unsigned int value that can be stored in a Json::Value.
Definition: json.h:534
Represents a JSON value.
Definition: json.h:504
Json::Int64 Int64
Definition: json.h:514
const char * c_str() const
Definition: json.h:464
std::string message_
Definition: json.h:1383
Configuration passed to reader and writer. This configuration object can be used to force the Reader ...
Definition: json.h:305
Json::Value settings_
Definition: json.h:1720
bool addChildValues_
Definition: json.h:1851
a comment placed on the line before a value
Definition: json.h:432
static const UInt64 maxUInt64
Maximum unsigned 64 bits int value that can be stored in a Json::Value.
Definition: json.h:542
std::deque< ErrorInfo > Errors
Definition: json.h:1387
static const Int64 maxInt64
Maximum signed 64 bits int value that can be stored in a Json::Value.
Definition: json.h:540
difference_type operator-(const SelfType &other) const
Definition: json.h:1017
long long int Int64
Location start_
Definition: json.h:1376
Outputs a Value in JSON format without formatting (not human friendly).
Definition: json.h:1765
SelfType & operator--()
Definition: json.h:1154
virtual ~CharReader()
Definition: json.h:1446
const char * c_str_
Definition: json.h:467
void swap(Json::Value &a, Json::Value &b)
Specialize std::swap() for Json::Value.
Definition: json.h:1175
static const Int minInt
Minimum signed int value that can be stored in a Json::Value.
Definition: json.h:530
char const * cstr_
Definition: json.h:575
std::string JSON_API valueToString(Int value)
Definition: jsoncpp.cpp:4032
reference operator*() const
Definition: json.h:1164
Int64 LargestInt
difference_type computeDistance(const SelfType &other) const
Definition: jsoncpp.cpp:2241
void throwLogicError(std::string const &msg)
used internally
Definition: jsoncpp.cpp:2569
std::map< CZString, Value > ObjectValues
Definition: json.h:584
size_t start_
Definition: json.h:936
An error tagged with where in the JSON text it was encountered.
Definition: json.h:1241
Abstract class for writers.
Definition: json.h:1749
ValueConstIterator SelfType
Definition: json.h:1080
Json::UInt UInt
Definition: json.h:510
ArrayIndex index_
Definition: json.h:959
object value (collection of name/value pairs).
Definition: json.h:428
bool value
Definition: json.h:426
Json::LargestUInt LargestUInt
Definition: json.h:517
Build a CharReader implementation.
Definition: json.h:1490
SelfType operator--(int)
Definition: json.h:1148
void swap(Value &other)
Swap everything.
Definition: jsoncpp.cpp:2862
Location end_
Definition: json.h:1377
ValueType
Type of the value held by a Value object.
Definition: json.h:420
Errors errors_
Definition: json.h:1430
virtual ~StyledWriter()
Definition: json.h:1821
Args args_
Definition: json.h:1000
static const Value & null
We regret this reference to a global instance; prefer the simpler Value().
Definition: json.h:520
std::string key_
Definition: json.h:958
size_t limit_
Definition: json.h:937
ValueIteratorBase SelfType
Definition: json.h:1011
a comment just after a value on the same line
Definition: json.h:433
JSON_API std::istream & operator>>(std::istream &, Value &)
Read from 'sin' into 'root'.
Definition: jsoncpp.cpp:2174
Json::UInt64 UInt64
Definition: json.h:513
SelfType & operator++()
Definition: json.h:1159
Location end_
Definition: json.h:1433
base class for Value iterators.
Definition: json.h:1006
Value value_type
Definition: json.h:1124
bool operator==(const SelfType &other) const
Definition: json.h:1013
std::string indentString_
Definition: json.h:1912
CommentPlacement
Definition: json.h:431
const Value value_type
Definition: json.h:1075
int Int
Value * pointer
Definition: json.h:1128
std::vector< const PathArgument * > InArgs
Definition: json.h:990
'null' value
Definition: json.h:421
pointer operator->() const
Definition: json.h:1115
bool operator!=(const SelfType &other) const
Definition: json.h:1015
SelfType & operator--()
Definition: json.h:1103
UTF-8 string value.
Definition: json.h:425
SelfType operator++(int)
Definition: json.h:1142
static const Int maxInt
Maximum signed int value that can be stored in a Json::Value.
Definition: json.h:532
unsigned int size_t
Definition: json.h:1009
bool JSON_API parseFromStream(CharReader::Factory const &, std::istream &, Value *root, std::string *errs)
Definition: jsoncpp.cpp:2160
Nodes nodes_
Definition: json.h:1429
bool allowDroppedNullPlaceholders_
true if dropped null placeholders are allowed. Default: false.
Definition: json.h:335
std::string indentation_
Definition: json.h:1914
A simple abstract factory.
Definition: json.h:1668
StaticString(const char *czstring)
Definition: json.h:460
Unserialize a JSON document into a Value.
Definition: json.h:1230
SelfType operator++(int)
Definition: json.h:1091
ChildValues childValues_
Definition: json.h:1910
unsigned long long int UInt64
Features features_
Definition: json.h:1438
std::vector< PathArgument > Args
Definition: json.h:991
ValueIterator SelfType
Definition: json.h:1129
CommentInfo * comments_
Definition: json.h:932
static const LargestInt maxLargestInt
Maximum signed integer value that can be stored in a Json::Value.
Definition: json.h:525
std::string document_
Definition: json.h:1847
std::bidirectional_iterator_tag iterator_category
Definition: json.h:1008
Build a StreamWriter implementation.
Definition: json.h:1699
Iterator for object and array value.
Definition: json.h:1120
Location lastValueEnd_
Definition: json.h:1435
const Char * Location
Definition: json.h:1233
reference operator*() const
Definition: json.h:1113
std::string document_
Definition: json.h:1431
std::vector< std::string > ChildValues
Definition: json.h:1908
Writes a Value in JSON format in a human friendly way.
Definition: json.h:1818
Experimental and untested: represents a "path" to access a node.
Definition: json.h:974
virtual ~FastWriter()
Definition: json.h:1769
ChildValues childValues_
Definition: json.h:1846
bool strictRoot_
Definition: json.h:332
Location begin_
Definition: json.h:1432
const iterator for object and array value.
Definition: json.h:1071
const Value * pointer
Definition: json.h:1079
Value * lastValue_
Definition: json.h:1436
#define JSONCPP_DEPRECATED(message)
Definition: json.h:196
unsigned int size_t
Definition: json.h:1125
array value (ordered list)
Definition: json.h:427
static std::string normalizeEOL(Reader::Location begin, Reader::Location end)
Definition: jsoncpp.cpp:541
void throwRuntimeError(std::string const &msg)
used internally
Definition: jsoncpp.cpp:2565
Value & reference
Definition: json.h:1127
static const Value & nullRef
Definition: json.h:521


mission_planning
Author(s): ivan
autogenerated on Thu Nov 12 2015 19:08:20