update bundled jsoncpp to 1.9.3
(still comment the deprecation warning, which we should eventually fix ...)
This commit is contained in:
parent
598fb071e3
commit
738a3bf1c5
203
third_party/jsoncpp/json/json-forwards.h
vendored
203
third_party/jsoncpp/json/json-forwards.h
vendored
@ -1,4 +1,4 @@
|
|||||||
/// Json-cpp amalgated forward header (http://jsoncpp.sourceforge.net/).
|
/// Json-cpp amalgamated forward header (http://jsoncpp.sourceforge.net/).
|
||||||
/// It is intended to be used with #include "json/json-forwards.h"
|
/// It is intended to be used with #include "json/json-forwards.h"
|
||||||
/// This header provides forward declaration for all JsonCpp types.
|
/// This header provides forward declaration for all JsonCpp types.
|
||||||
|
|
||||||
@ -11,13 +11,13 @@ The JsonCpp library's source code, including accompanying documentation,
|
|||||||
tests and demonstration applications, are licensed under the following
|
tests and demonstration applications, are licensed under the following
|
||||||
conditions...
|
conditions...
|
||||||
|
|
||||||
The author (Baptiste Lepilleur) explicitly disclaims copyright in all
|
Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all
|
||||||
jurisdictions which recognize such a disclaimer. In such jurisdictions,
|
jurisdictions which recognize such a disclaimer. In such jurisdictions,
|
||||||
this software is released into the Public Domain.
|
this software is released into the Public Domain.
|
||||||
|
|
||||||
In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
|
In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
|
||||||
2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is
|
2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur and
|
||||||
released under the terms of the MIT License (see below).
|
The JsonCpp Authors, and is released under the terms of the MIT License (see below).
|
||||||
|
|
||||||
In jurisdictions which recognize Public Domain property, the user of this
|
In jurisdictions which recognize Public Domain property, the user of this
|
||||||
software may choose to accept it either as 1) Public Domain, 2) under the
|
software may choose to accept it either as 1) Public Domain, 2) under the
|
||||||
@ -32,7 +32,7 @@ described in clear, concise terms at:
|
|||||||
The full text of the MIT License follows:
|
The full text of the MIT License follows:
|
||||||
|
|
||||||
========================================================================
|
========================================================================
|
||||||
Copyright (c) 2007-2010 Baptiste Lepilleur
|
Copyright (c) 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person
|
Permission is hereby granted, free of charge, to any person
|
||||||
obtaining a copy of this software and associated documentation
|
obtaining a copy of this software and associated documentation
|
||||||
@ -73,9 +73,9 @@ license you like.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef JSON_FORWARD_AMALGATED_H_INCLUDED
|
#ifndef JSON_FORWARD_AMALGAMATED_H_INCLUDED
|
||||||
# define JSON_FORWARD_AMALGATED_H_INCLUDED
|
# define JSON_FORWARD_AMALGAMATED_H_INCLUDED
|
||||||
/// If defined, indicates that the source file is amalgated
|
/// If defined, indicates that the source file is amalgamated
|
||||||
/// to prevent private header inclusion.
|
/// to prevent private header inclusion.
|
||||||
#define JSON_IS_AMALGAMATION
|
#define JSON_IS_AMALGAMATION
|
||||||
|
|
||||||
@ -83,23 +83,21 @@ license you like.
|
|||||||
// Beginning of content of file: include/json/config.h
|
// Beginning of content of file: include/json/config.h
|
||||||
// //////////////////////////////////////////////////////////////////////
|
// //////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// Copyright 2007-2010 Baptiste Lepilleur
|
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
|
||||||
// Distributed under MIT license, or public domain if desired and
|
// Distributed under MIT license, or public domain if desired and
|
||||||
// recognized in your jurisdiction.
|
// recognized in your jurisdiction.
|
||||||
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
|
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
|
||||||
|
|
||||||
#ifndef JSON_CONFIG_H_INCLUDED
|
#ifndef JSON_CONFIG_H_INCLUDED
|
||||||
#define JSON_CONFIG_H_INCLUDED
|
#define JSON_CONFIG_H_INCLUDED
|
||||||
|
#include <cstddef>
|
||||||
/// If defined, indicates that json library is embedded in CppTL library.
|
#include <cstdint>
|
||||||
//# define JSON_IN_CPPTL 1
|
#include <istream>
|
||||||
|
#include <memory>
|
||||||
/// If defined, indicates that json may leverage CppTL library
|
#include <ostream>
|
||||||
//# define JSON_USE_CPPTL 1
|
#include <sstream>
|
||||||
/// If defined, indicates that cpptl vector based map should be used instead of
|
#include <string>
|
||||||
/// std::map
|
#include <type_traits>
|
||||||
/// as Value container.
|
|
||||||
//# define JSON_USE_CPPTL_SMALLMAP 1
|
|
||||||
|
|
||||||
// If non-zero, the library uses exceptions to report bad input instead of C
|
// If non-zero, the library uses exceptions to report bad input instead of C
|
||||||
// assertion macros. The default is to use exceptions.
|
// assertion macros. The default is to use exceptions.
|
||||||
@ -107,43 +105,49 @@ license you like.
|
|||||||
#define JSON_USE_EXCEPTION 1
|
#define JSON_USE_EXCEPTION 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// If defined, indicates that the source file is amalgated
|
// Temporary, tracked for removal with issue #982.
|
||||||
|
#ifndef JSON_USE_NULLREF
|
||||||
|
#define JSON_USE_NULLREF 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/// If defined, indicates that the source file is amalgamated
|
||||||
/// to prevent private header inclusion.
|
/// to prevent private header inclusion.
|
||||||
/// Remarks: it is automatically defined in the generated amalgated header.
|
/// Remarks: it is automatically defined in the generated amalgamated header.
|
||||||
// #define JSON_IS_AMALGAMATION
|
// #define JSON_IS_AMALGAMATION
|
||||||
|
|
||||||
#ifdef JSON_IN_CPPTL
|
// Export macros for DLL visibility
|
||||||
#include <cpptl/config.h>
|
#if defined(JSON_DLL_BUILD)
|
||||||
#ifndef JSON_USE_CPPTL
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
#define JSON_USE_CPPTL 1
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef JSON_IN_CPPTL
|
|
||||||
#define JSON_API CPPTL_API
|
|
||||||
#elif defined(JSON_DLL_BUILD)
|
|
||||||
#if defined(_MSC_VER)
|
|
||||||
#define JSON_API __declspec(dllexport)
|
#define JSON_API __declspec(dllexport)
|
||||||
#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
|
#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
|
||||||
|
#elif defined(__GNUC__) || defined(__clang__)
|
||||||
|
#define JSON_API __attribute__((visibility("default")))
|
||||||
#endif // if defined(_MSC_VER)
|
#endif // if defined(_MSC_VER)
|
||||||
|
|
||||||
#elif defined(JSON_DLL)
|
#elif defined(JSON_DLL)
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
#define JSON_API __declspec(dllimport)
|
#define JSON_API __declspec(dllimport)
|
||||||
#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
|
#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
|
||||||
#endif // if defined(_MSC_VER)
|
#endif // if defined(_MSC_VER)
|
||||||
#endif // ifdef JSON_IN_CPPTL
|
#endif // ifdef JSON_DLL_BUILD
|
||||||
|
|
||||||
#if !defined(JSON_API)
|
#if !defined(JSON_API)
|
||||||
#define JSON_API
|
#define JSON_API
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(JSON_HAS_UNIQUE_PTR)
|
#if defined(_MSC_VER) && _MSC_VER < 1800
|
||||||
#if __cplusplus >= 201103L
|
#error \
|
||||||
#define JSON_HAS_UNIQUE_PTR (1)
|
"ERROR: Visual Studio 12 (2013) with _MSC_VER=1800 is the oldest supported compiler with sufficient C++11 capabilities"
|
||||||
#elif _MSC_VER >= 1600
|
|
||||||
#define JSON_HAS_UNIQUE_PTR (1)
|
|
||||||
#else
|
|
||||||
#define JSON_HAS_UNIQUE_PTR (0)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||||
|
// As recommended at
|
||||||
|
// https://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010
|
||||||
|
extern JSON_API int msvc_pre1900_c99_snprintf(char* outBuf, size_t size,
|
||||||
|
const char* format, ...);
|
||||||
|
#define jsoncpp_snprintf msvc_pre1900_c99_snprintf
|
||||||
|
#else
|
||||||
|
#define jsoncpp_snprintf std::snprintf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for
|
// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for
|
||||||
@ -151,55 +155,96 @@ license you like.
|
|||||||
// Storages, and 64 bits integer support is disabled.
|
// Storages, and 64 bits integer support is disabled.
|
||||||
// #define JSON_NO_INT64 1
|
// #define JSON_NO_INT64 1
|
||||||
|
|
||||||
#if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6
|
// JSONCPP_OVERRIDE is maintained for backwards compatibility of external tools.
|
||||||
// Microsoft Visual Studio 6 only support conversion from __int64 to double
|
// C++11 should be used directly in JSONCPP.
|
||||||
// (no conversion from unsigned __int64).
|
#define JSONCPP_OVERRIDE override
|
||||||
#define JSON_USE_INT64_DOUBLE_CONVERSION 1
|
|
||||||
// Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255'
|
|
||||||
// characters in the debug information)
|
|
||||||
// All projects I've ever seen with VS6 were using this globally (not bothering
|
|
||||||
// with pragma push/pop).
|
|
||||||
#pragma warning(disable : 4786)
|
|
||||||
#endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6
|
|
||||||
|
|
||||||
#if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008
|
#if __cplusplus >= 201103L
|
||||||
/// Indicates that the following function is deprecated.
|
#define JSONCPP_NOEXCEPT noexcept
|
||||||
#define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
|
#define JSONCPP_OP_EXPLICIT explicit
|
||||||
#elif defined(__clang__) && defined(__has_feature)
|
#elif defined(_MSC_VER) && _MSC_VER < 1900
|
||||||
#if __has_feature(attribute_deprecated_with_message)
|
#define JSONCPP_NOEXCEPT throw()
|
||||||
#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
|
#define JSONCPP_OP_EXPLICIT explicit
|
||||||
|
#elif defined(_MSC_VER) && _MSC_VER >= 1900
|
||||||
|
#define JSONCPP_NOEXCEPT noexcept
|
||||||
|
#define JSONCPP_OP_EXPLICIT explicit
|
||||||
|
#else
|
||||||
|
#define JSONCPP_NOEXCEPT throw()
|
||||||
|
#define JSONCPP_OP_EXPLICIT
|
||||||
#endif
|
#endif
|
||||||
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
|
|
||||||
#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
|
#ifdef __clang__
|
||||||
#elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
|
#if __has_extension(attribute_deprecated_with_message)
|
||||||
|
#define JSONCPP_DEPRECATED(message) __attribute__((deprecated(message)))
|
||||||
|
#endif
|
||||||
|
#elif defined(__GNUC__) // not clang (gcc comes later since clang emulates gcc)
|
||||||
|
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
|
||||||
|
#define JSONCPP_DEPRECATED(message) __attribute__((deprecated(message)))
|
||||||
|
#elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
|
||||||
#define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__))
|
#define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__))
|
||||||
#endif
|
#endif // GNUC version
|
||||||
|
#elif defined(_MSC_VER) // MSVC (after clang because clang on Windows emulates
|
||||||
|
// MSVC)
|
||||||
|
#define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
|
||||||
|
#endif // __clang__ || __GNUC__ || _MSC_VER
|
||||||
|
|
||||||
#if !defined(JSONCPP_DEPRECATED)
|
#if !defined(JSONCPP_DEPRECATED)
|
||||||
#define JSONCPP_DEPRECATED(message)
|
#define JSONCPP_DEPRECATED(message)
|
||||||
#endif // if !defined(JSONCPP_DEPRECATED)
|
#endif // if !defined(JSONCPP_DEPRECATED)
|
||||||
|
|
||||||
|
#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 6))
|
||||||
|
#define JSON_USE_INT64_DOUBLE_CONVERSION 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(JSON_IS_AMALGAMATION)
|
||||||
|
|
||||||
|
#include "allocator.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
#endif // if !defined(JSON_IS_AMALGAMATION)
|
||||||
|
|
||||||
namespace Json {
|
namespace Json {
|
||||||
typedef int Int;
|
using Int = int;
|
||||||
typedef unsigned int UInt;
|
using UInt = unsigned int;
|
||||||
#if defined(JSON_NO_INT64)
|
#if defined(JSON_NO_INT64)
|
||||||
typedef int LargestInt;
|
using LargestInt = int;
|
||||||
typedef unsigned int LargestUInt;
|
using LargestUInt = unsigned int;
|
||||||
#undef JSON_HAS_INT64
|
#undef JSON_HAS_INT64
|
||||||
#else // if defined(JSON_NO_INT64)
|
#else // if defined(JSON_NO_INT64)
|
||||||
// For Microsoft Visual use specific types as long long is not supported
|
// For Microsoft Visual use specific types as long long is not supported
|
||||||
#if defined(_MSC_VER) // Microsoft Visual Studio
|
#if defined(_MSC_VER) // Microsoft Visual Studio
|
||||||
typedef __int64 Int64;
|
using Int64 = __int64;
|
||||||
typedef unsigned __int64 UInt64;
|
using UInt64 = unsigned __int64;
|
||||||
#else // if defined(_MSC_VER) // Other platforms, use long long
|
#else // if defined(_MSC_VER) // Other platforms, use long long
|
||||||
typedef long long int Int64;
|
using Int64 = int64_t;
|
||||||
typedef unsigned long long int UInt64;
|
using UInt64 = uint64_t;
|
||||||
#endif // if defined(_MSC_VER)
|
#endif // if defined(_MSC_VER)
|
||||||
typedef Int64 LargestInt;
|
using LargestInt = Int64;
|
||||||
typedef UInt64 LargestUInt;
|
using LargestUInt = UInt64;
|
||||||
#define JSON_HAS_INT64
|
#define JSON_HAS_INT64
|
||||||
#endif // if defined(JSON_NO_INT64)
|
#endif // if defined(JSON_NO_INT64)
|
||||||
} // end namespace Json
|
|
||||||
|
template <typename T>
|
||||||
|
using Allocator =
|
||||||
|
typename std::conditional<JSONCPP_USING_SECURE_MEMORY, SecureAllocator<T>,
|
||||||
|
std::allocator<T>>::type;
|
||||||
|
using String = std::basic_string<char, std::char_traits<char>, Allocator<char>>;
|
||||||
|
using IStringStream =
|
||||||
|
std::basic_istringstream<String::value_type, String::traits_type,
|
||||||
|
String::allocator_type>;
|
||||||
|
using OStringStream =
|
||||||
|
std::basic_ostringstream<String::value_type, String::traits_type,
|
||||||
|
String::allocator_type>;
|
||||||
|
using IStream = std::istream;
|
||||||
|
using OStream = std::ostream;
|
||||||
|
} // namespace Json
|
||||||
|
|
||||||
|
// Legacy names (formerly macros).
|
||||||
|
using JSONCPP_STRING = Json::String;
|
||||||
|
using JSONCPP_ISTRINGSTREAM = Json::IStringStream;
|
||||||
|
using JSONCPP_OSTRINGSTREAM = Json::OStringStream;
|
||||||
|
using JSONCPP_ISTREAM = Json::IStream;
|
||||||
|
using JSONCPP_OSTREAM = Json::OStream;
|
||||||
|
|
||||||
#endif // JSON_CONFIG_H_INCLUDED
|
#endif // JSON_CONFIG_H_INCLUDED
|
||||||
|
|
||||||
@ -216,7 +261,7 @@ typedef UInt64 LargestUInt;
|
|||||||
// Beginning of content of file: include/json/forwards.h
|
// Beginning of content of file: include/json/forwards.h
|
||||||
// //////////////////////////////////////////////////////////////////////
|
// //////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// Copyright 2007-2010 Baptiste Lepilleur
|
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
|
||||||
// Distributed under MIT license, or public domain if desired and
|
// Distributed under MIT license, or public domain if desired and
|
||||||
// recognized in your jurisdiction.
|
// recognized in your jurisdiction.
|
||||||
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
|
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
|
||||||
@ -231,17 +276,23 @@ typedef UInt64 LargestUInt;
|
|||||||
namespace Json {
|
namespace Json {
|
||||||
|
|
||||||
// writer.h
|
// writer.h
|
||||||
|
class StreamWriter;
|
||||||
|
class StreamWriterBuilder;
|
||||||
|
class Writer;
|
||||||
class FastWriter;
|
class FastWriter;
|
||||||
class StyledWriter;
|
class StyledWriter;
|
||||||
|
class StyledStreamWriter;
|
||||||
|
|
||||||
// reader.h
|
// reader.h
|
||||||
class Reader;
|
class Reader;
|
||||||
|
class CharReader;
|
||||||
|
class CharReaderBuilder;
|
||||||
|
|
||||||
// features.h
|
// json_features.h
|
||||||
class Features;
|
class Features;
|
||||||
|
|
||||||
// value.h
|
// value.h
|
||||||
typedef unsigned int ArrayIndex;
|
using ArrayIndex = unsigned int;
|
||||||
class StaticString;
|
class StaticString;
|
||||||
class Path;
|
class Path;
|
||||||
class PathArgument;
|
class PathArgument;
|
||||||
@ -262,4 +313,4 @@ class ValueConstIterator;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif //ifndef JSON_FORWARD_AMALGATED_H_INCLUDED
|
#endif //ifndef JSON_FORWARD_AMALGAMATED_H_INCLUDED
|
||||||
|
1646
third_party/jsoncpp/json/json.h
vendored
1646
third_party/jsoncpp/json/json.h
vendored
File diff suppressed because it is too large
Load Diff
3104
third_party/jsoncpp/jsoncpp.cpp
vendored
3104
third_party/jsoncpp/jsoncpp.cpp
vendored
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user