diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 000000000..f96f9b618
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,24 @@
+cmake_minimum_required(VERSION 3.0)
+
+project(jsoncpp)
+
+if(NOT CMAKE_CXX_STANDARD)
+ set(CMAKE_CXX_STANDARD 17)
+endif()
+
+set(SOURCES_JSONCPP
+ "src/lib_json/json_batchallocator.h"
+ "src/lib_json/json_internalarray.inl"
+ "src/lib_json/json_internalmap.inl"
+ "src/lib_json/json_reader.cpp"
+ "src/lib_json/json_value.cpp"
+ "src/lib_json/json_valueiterator.inl"
+ "src/lib_json/json_writer.cpp"
+)
+
+add_library(jsoncpp ${SOURCES_JSONCPP})
+
+target_include_directories(jsoncpp PUBLIC
+ $
+ $
+)
diff --git a/include/json/autolink.h b/include/json/autolink.h
index 02328d1f1..c7c1e1305 100644
--- a/include/json/autolink.h
+++ b/include/json/autolink.h
@@ -3,22 +3,22 @@
// recognized in your jurisdiction.
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-#ifndef JSON_AUTOLINK_H_INCLUDED
-# define JSON_AUTOLINK_H_INCLUDED
+#ifndef JSONCPP_AUTOLINK_H_INCLUDED
+# define JSONCPP_AUTOLINK_H_INCLUDED
# include "config.h"
-# ifdef JSON_IN_CPPTL
+# ifdef JSONCPP_IN_CPPTL
# include
# endif
-# if !defined(JSON_NO_AUTOLINK) && !defined(JSON_DLL_BUILD) && !defined(JSON_IN_CPPTL)
+# if !defined(JSONCPP_NO_AUTOLINK) && !defined(JSONCPP_DLL_BUILD) && !defined(JSONCPP_IN_CPPTL)
# define CPPTL_AUTOLINK_NAME "json"
# undef CPPTL_AUTOLINK_DLL
-# ifdef JSON_DLL
+# ifdef JSONCPP_DLL
# define CPPTL_AUTOLINK_DLL
# endif
# include "autolink.h"
# endif
-#endif // JSON_AUTOLINK_H_INCLUDED
+#endif // JSONCPP_AUTOLINK_H_INCLUDED
diff --git a/include/json/config.h b/include/json/config.h
index 7609d45e7..768beba68 100644
--- a/include/json/config.h
+++ b/include/json/config.h
@@ -3,62 +3,65 @@
// recognized in your jurisdiction.
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-#ifndef JSON_CONFIG_H_INCLUDED
-# define JSON_CONFIG_H_INCLUDED
+#ifndef JSONCPP_CONFIG_H_INCLUDED
+# define JSONCPP_CONFIG_H_INCLUDED
/// If defined, indicates that json library is embedded in CppTL library.
-//# define JSON_IN_CPPTL 1
+//# define JSONCPP_IN_CPPTL 1
/// If defined, indicates that json may leverage CppTL library
-//# define JSON_USE_CPPTL 1
+//# define JSONCPP_USE_CPPTL 1
/// If defined, indicates that cpptl vector based map should be used instead of std::map
/// as Value container.
-//# define JSON_USE_CPPTL_SMALLMAP 1
+//# define JSONCPP_USE_CPPTL_SMALLMAP 1
/// If defined, indicates that Json specific container should be used
/// (hash table & simple deque container with customizable allocator).
/// THIS FEATURE IS STILL EXPERIMENTAL! There is know bugs: See #3177332
-//# define JSON_VALUE_USE_INTERNAL_MAP 1
+//# define JSONCPP_VALUE_USE_INTERNAL_MAP 1
/// Force usage of standard new/malloc based allocator instead of memory pool based allocator.
/// The memory pools allocator used optimization (initializing Value and ValueInternalLink
/// as if it was a POD) that may cause some validation tool to report errors.
-/// Only has effects if JSON_VALUE_USE_INTERNAL_MAP is defined.
-//# define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1
+/// Only has effects if JSONCPP_VALUE_USE_INTERNAL_MAP is defined.
+//# define JSONCPP_USE_SIMPLE_INTERNAL_ALLOCATOR 1
/// If defined, indicates that Json use exception to report invalid type manipulation
/// instead of C assert macro.
-# define JSON_USE_EXCEPTION 1
+# define JSONCPP_USE_EXCEPTION 1
/// If defined, indicates that the source file is amalgated
/// to prevent private header inclusion.
/// Remarks: it is automatically defined in the generated amalgated header.
-// #define JSON_IS_AMALGAMATION
+// #define JSONCPP_IS_AMALGAMATION
+/// If defined, all asserts will be enabled. Else, they will have no effect
+/// Remarks: defining this macro enables the functionality of: JSONCPP_ASSERT_UNREACHABLE, JSONCPP_ASSERT, JSONCPP_FAIL_MESSAGE, and JSONCPP_ASSERT_MESSAGE
+//# define JSONCPP_ENABLE_ASSERTS 1
-# ifdef JSON_IN_CPPTL
+# ifdef JSONCPP_IN_CPPTL
# include
-# ifndef JSON_USE_CPPTL
-# define JSON_USE_CPPTL 1
+# ifndef JSONCPP_USE_CPPTL
+# define JSONCPP_USE_CPPTL 1
# endif
# endif
-# ifdef JSON_IN_CPPTL
-# define JSON_API CPPTL_API
-# elif defined(JSON_DLL_BUILD)
-# define JSON_API __declspec(dllexport)
-# elif defined(JSON_DLL)
-# define JSON_API __declspec(dllimport)
+# ifdef JSONCPP_IN_CPPTL
+# define JSONCPP_API CPPTL_API
+# elif defined(JSONCPP_DLL_BUILD)
+# define JSONCPP_API __declspec(dllexport)
+# elif defined(JSONCPP_DLL)
+# define JSONCPP_API __declspec(dllimport)
# else
-# define JSON_API
+# define JSONCPP_API
# endif
-// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for integer
+// If JSONCPP_NO_INT64 is defined, then Json only support C++ "int" type for integer
// Storages, and 64 bits integer support is disabled.
-// #define JSON_NO_INT64 1
+// #define JSONCPP_NO_INT64 1
#if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6
// Microsoft Visual Studio 6 only support conversion from __int64 to double
// (no conversion from unsigned __int64).
-#define JSON_USE_INT64_DOUBLE_CONVERSION 1
+#define JSONCPP_USE_INT64_DOUBLE_CONVERSION 1
#endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6
#if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008
@@ -73,11 +76,11 @@
namespace Json {
typedef int Int;
typedef unsigned int UInt;
-# if defined(JSON_NO_INT64)
+# if defined(JSONCPP_NO_INT64)
typedef int LargestInt;
typedef unsigned int LargestUInt;
-# undef JSON_HAS_INT64
-# else // if defined(JSON_NO_INT64)
+# undef JSONCPP_HAS_INT64
+# else // if defined(JSONCPP_NO_INT64)
// For Microsoft Visual use specific types as long long is not supported
# if defined(_MSC_VER) // Microsoft Visual Studio
typedef __int64 Int64;
@@ -88,9 +91,9 @@ namespace Json {
# endif // if defined(_MSC_VER)
typedef Int64 LargestInt;
typedef UInt64 LargestUInt;
-# define JSON_HAS_INT64
-# endif // if defined(JSON_NO_INT64)
+# define JSONCPP_HAS_INT64
+# endif // if defined(JSONCPP_NO_INT64)
} // end namespace Json
-#endif // JSON_CONFIG_H_INCLUDED
+#endif // JSONCPP_CONFIG_H_INCLUDED
diff --git a/include/json/features.h b/include/json/features.h
index 435327844..464fce637 100644
--- a/include/json/features.h
+++ b/include/json/features.h
@@ -3,12 +3,12 @@
// recognized in your jurisdiction.
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-#ifndef CPPTL_JSON_FEATURES_H_INCLUDED
-# define CPPTL_JSON_FEATURES_H_INCLUDED
+#ifndef CPPTL_JSONCPP_FEATURES_H_INCLUDED
+# define CPPTL_JSONCPP_FEATURES_H_INCLUDED
-#if !defined(JSON_IS_AMALGAMATION)
+#if !defined(JSONCPP_IS_AMALGAMATION)
# include "forwards.h"
-#endif // if !defined(JSON_IS_AMALGAMATION)
+#endif // if !defined(JSONCPP_IS_AMALGAMATION)
namespace Json {
@@ -16,7 +16,7 @@ namespace Json {
* This configuration object can be used to force the Reader or Writer
* to behave in a standard conforming way.
*/
- class JSON_API Features
+ class JSONCPP_API Features
{
public:
/** \brief A configuration that allows all features and assumes all strings are UTF-8.
@@ -46,4 +46,4 @@ namespace Json {
} // namespace Json
-#endif // CPPTL_JSON_FEATURES_H_INCLUDED
+#endif // CPPTL_JSONCPP_FEATURES_H_INCLUDED
diff --git a/include/json/forwards.h b/include/json/forwards.h
index ab863da85..8de1072c5 100644
--- a/include/json/forwards.h
+++ b/include/json/forwards.h
@@ -3,12 +3,12 @@
// recognized in your jurisdiction.
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-#ifndef JSON_FORWARDS_H_INCLUDED
-# define JSON_FORWARDS_H_INCLUDED
+#ifndef JSONCPP_FORWARDS_H_INCLUDED
+# define JSONCPP_FORWARDS_H_INCLUDED
-#if !defined(JSON_IS_AMALGAMATION)
+#if !defined(JSONCPP_IS_AMALGAMATION)
# include "config.h"
-#endif // if !defined(JSON_IS_AMALGAMATION)
+#endif // if !defined(JSONCPP_IS_AMALGAMATION)
namespace Json {
@@ -31,14 +31,14 @@ namespace Json {
class ValueIteratorBase;
class ValueIterator;
class ValueConstIterator;
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
+#ifdef JSONCPP_VALUE_USE_INTERNAL_MAP
class ValueMapAllocator;
class ValueInternalLink;
class ValueInternalArray;
class ValueInternalMap;
-#endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
+#endif // #ifdef JSONCPP_VALUE_USE_INTERNAL_MAP
} // namespace Json
-#endif // JSON_FORWARDS_H_INCLUDED
+#endif // JSONCPP_FORWARDS_H_INCLUDED
diff --git a/include/json/json.h b/include/json/json.h
index da5fc967e..746c0ba25 100644
--- a/include/json/json.h
+++ b/include/json/json.h
@@ -3,8 +3,8 @@
// recognized in your jurisdiction.
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-#ifndef JSON_JSON_H_INCLUDED
-# define JSON_JSON_H_INCLUDED
+#ifndef JSONCPP_JSON_H_INCLUDED
+# define JSONCPP_JSON_H_INCLUDED
# include "autolink.h"
# include "value.h"
@@ -12,4 +12,4 @@
# include "writer.h"
# include "features.h"
-#endif // JSON_JSON_H_INCLUDED
+#endif // JSONCPP_JSON_H_INCLUDED
diff --git a/include/json/reader.h b/include/json/reader.h
index 0a324dfc5..ee5e0215c 100644
--- a/include/json/reader.h
+++ b/include/json/reader.h
@@ -3,13 +3,13 @@
// recognized in your jurisdiction.
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-#ifndef CPPTL_JSON_READER_H_INCLUDED
-# define CPPTL_JSON_READER_H_INCLUDED
+#ifndef CPPTL_JSONCPP_READER_H_INCLUDED
+# define CPPTL_JSONCPP_READER_H_INCLUDED
-#if !defined(JSON_IS_AMALGAMATION)
+#if !defined(JSONCPP_IS_AMALGAMATION)
# include "features.h"
# include "value.h"
-#endif // if !defined(JSON_IS_AMALGAMATION)
+#endif // if !defined(JSONCPP_IS_AMALGAMATION)
# include
# include
# include
@@ -20,7 +20,7 @@ namespace Json {
/** \brief Unserialize a JSON document into a Value.
*
*/
- class JSON_API Reader
+ class JSONCPP_API Reader
{
public:
typedef char Char;
@@ -211,4 +211,4 @@ namespace Json {
} // namespace Json
-#endif // CPPTL_JSON_READER_H_INCLUDED
+#endif // CPPTL_JSONCPP_READER_H_INCLUDED
diff --git a/include/json/value.h b/include/json/value.h
index 32e3455ec..bc6b4ab73 100644
--- a/include/json/value.h
+++ b/include/json/value.h
@@ -3,24 +3,36 @@
// recognized in your jurisdiction.
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-#ifndef CPPTL_JSON_H_INCLUDED
-# define CPPTL_JSON_H_INCLUDED
+#ifndef CPPTL_JSONCPP_H_INCLUDED
+# define CPPTL_JSONCPP_H_INCLUDED
-#if !defined(JSON_IS_AMALGAMATION)
+#if !defined(JSONCPP_IS_AMALGAMATION)
# include "forwards.h"
-#endif // if !defined(JSON_IS_AMALGAMATION)
+#endif // if !defined(JSONCPP_IS_AMALGAMATION)
# include
# include
-# ifndef JSON_USE_CPPTL_SMALLMAP
+# ifndef JSONCPP_USE_CPPTL_SMALLMAP
# include