mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Clean up ripple_json module and remove unnecessary includes
This commit is contained in:
@@ -1,9 +1,6 @@
|
|||||||
#ifndef JSONCPP_BATCHALLOCATOR_H_INCLUDED
|
#ifndef JSONCPP_BATCHALLOCATOR_H_INCLUDED
|
||||||
# define JSONCPP_BATCHALLOCATOR_H_INCLUDED
|
# define JSONCPP_BATCHALLOCATOR_H_INCLUDED
|
||||||
|
|
||||||
# include <stdlib.h>
|
|
||||||
# include <assert.h>
|
|
||||||
|
|
||||||
# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
|
# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
|
||||||
|
|
||||||
namespace Json {
|
namespace Json {
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
#ifndef CPPTL_JSON_FEATURES_H_INCLUDED
|
#ifndef CPPTL_JSON_FEATURES_H_INCLUDED
|
||||||
#define CPPTL_JSON_FEATURES_H_INCLUDED
|
#define CPPTL_JSON_FEATURES_H_INCLUDED
|
||||||
|
|
||||||
#include "json_forwards.h"
|
|
||||||
|
|
||||||
namespace Json {
|
namespace Json {
|
||||||
|
|
||||||
/** \brief Configuration passed to reader and writer.
|
/** \brief Configuration passed to reader and writer.
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
#ifndef JSON_FORWARDS_H_INCLUDED
|
#ifndef JSON_FORWARDS_H_INCLUDED
|
||||||
# define JSON_FORWARDS_H_INCLUDED
|
#define JSON_FORWARDS_H_INCLUDED
|
||||||
|
|
||||||
# include "json_config.h"
|
|
||||||
|
|
||||||
namespace Json {
|
namespace Json {
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,3 @@
|
|||||||
|
|
||||||
#include "json_reader.h"
|
|
||||||
#include "json_value.h"
|
|
||||||
|
|
||||||
#include <utility>
|
|
||||||
#include <cstdio>
|
|
||||||
#include <cassert>
|
|
||||||
#include <cstring>
|
|
||||||
#include <iostream>
|
|
||||||
#include <stdexcept>
|
|
||||||
|
|
||||||
#if _MSC_VER >= 1400 // VC++ 8.0
|
|
||||||
#pragma warning( disable : 4996 ) // disable warning about strdup being deprecated.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Json {
|
namespace Json {
|
||||||
|
|
||||||
// Implementation of class Features
|
// Implementation of class Features
|
||||||
|
|||||||
@@ -1,14 +1,6 @@
|
|||||||
#ifndef CPPTL_JSON_READER_H_INCLUDED
|
#ifndef CPPTL_JSON_READER_H_INCLUDED
|
||||||
# define CPPTL_JSON_READER_H_INCLUDED
|
# define CPPTL_JSON_READER_H_INCLUDED
|
||||||
|
|
||||||
#include "json_features.h"
|
|
||||||
#include "json_value.h"
|
|
||||||
|
|
||||||
#include <deque>
|
|
||||||
#include <stack>
|
|
||||||
#include <string>
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
namespace Json {
|
namespace Json {
|
||||||
|
|
||||||
/** \brief Unserialize a <a HREF="http://www.json.org">JSON</a> document into a Value.
|
/** \brief Unserialize a <a HREF="http://www.json.org">JSON</a> document into a Value.
|
||||||
|
|||||||
@@ -1,24 +1,3 @@
|
|||||||
#include <iostream>
|
|
||||||
#include "json_value.h"
|
|
||||||
#include "json_writer.h"
|
|
||||||
#include <utility>
|
|
||||||
#include <stdexcept>
|
|
||||||
#include <cstring>
|
|
||||||
#include <cassert>
|
|
||||||
#ifdef JSON_USE_CPPTL
|
|
||||||
# include <cpptl/conststring.h>
|
|
||||||
#endif
|
|
||||||
#include <cstddef> // size_t
|
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
|
|
||||||
# include "json_batchallocator.h"
|
|
||||||
#endif // #ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
|
|
||||||
|
|
||||||
#define JSON_ASSERT_UNREACHABLE assert( false )
|
|
||||||
#define JSON_ASSERT( condition ) assert( condition ); // @todo <= change this into an exception throw
|
|
||||||
#define JSON_ASSERT_MESSAGE( condition, message ) if (!( condition )) throw std::runtime_error( message );
|
|
||||||
|
|
||||||
namespace Json {
|
namespace Json {
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,6 @@
|
|||||||
#ifndef CPPTL_JSON_H_INCLUDED
|
#ifndef CPPTL_JSON_H_INCLUDED
|
||||||
# define CPPTL_JSON_H_INCLUDED
|
# define CPPTL_JSON_H_INCLUDED
|
||||||
|
|
||||||
#include "json_forwards.h"
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#ifndef JSON_USE_CPPTL_SMALLMAP
|
|
||||||
# include <map>
|
|
||||||
#else
|
|
||||||
# include <cpptl/smallmap.h>
|
|
||||||
#endif
|
|
||||||
#ifdef JSON_USE_CPPTL
|
|
||||||
# include <cpptl/forwards.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** \brief JSON (JavaScript Object Notation).
|
/** \brief JSON (JavaScript Object Notation).
|
||||||
*/
|
*/
|
||||||
namespace Json {
|
namespace Json {
|
||||||
|
|||||||
@@ -1,16 +1,3 @@
|
|||||||
#include <utility>
|
|
||||||
#include <assert.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <iostream>
|
|
||||||
#include <sstream>
|
|
||||||
#include <iomanip>
|
|
||||||
|
|
||||||
#include "json_writer.h"
|
|
||||||
|
|
||||||
#if _MSC_VER >= 1400 // VC++ 8.0
|
|
||||||
#pragma warning( disable : 4996 ) // disable warning about strdup being deprecated.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Json {
|
namespace Json {
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,6 @@
|
|||||||
#ifndef JSON_WRITER_H_INCLUDED
|
#ifndef JSON_WRITER_H_INCLUDED
|
||||||
# define JSON_WRITER_H_INCLUDED
|
# define JSON_WRITER_H_INCLUDED
|
||||||
|
|
||||||
# include "json_value.h"
|
|
||||||
|
|
||||||
# include <vector>
|
|
||||||
# include <string>
|
|
||||||
# include <iostream>
|
|
||||||
|
|
||||||
namespace Json {
|
namespace Json {
|
||||||
|
|
||||||
class Value;
|
class Value;
|
||||||
|
|||||||
@@ -24,6 +24,38 @@
|
|||||||
|
|
||||||
#include "ripple_json.h"
|
#include "ripple_json.h"
|
||||||
|
|
||||||
|
// VFALCO: TODO Remove unneeded includes
|
||||||
|
#include <cstddef>
|
||||||
|
//#include <cstdio>
|
||||||
|
//#include <cstring>
|
||||||
|
#include <iomanip>
|
||||||
|
//#include <iostream>
|
||||||
|
//#include <sstream>
|
||||||
|
//#include <stdexcept>
|
||||||
|
//#include <stdio.h>
|
||||||
|
//#include <string.h>
|
||||||
|
//#include <utility>
|
||||||
|
|
||||||
|
#ifdef JSON_USE_CPPTL
|
||||||
|
# include <cpptl/conststring.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// VFALCO: TODO, eliminate this boost dependency
|
||||||
|
#include <boost/lexical_cast.hpp>
|
||||||
|
|
||||||
|
#ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
|
||||||
|
#include "json/json_batchallocator.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define JSON_ASSERT_UNREACHABLE assert( false )
|
||||||
|
#define JSON_ASSERT( condition ) assert( condition ); // @todo <= change this into an exception throw
|
||||||
|
#define JSON_ASSERT_MESSAGE( condition, message ) if (!( condition )) throw std::runtime_error( message );
|
||||||
|
|
||||||
|
//#if _MSC_VER >= 1400 // VC++ 8.0
|
||||||
|
//#pragma warning( disable : 4996 ) // disable warning about strdup being deprecated.
|
||||||
|
//#endif
|
||||||
|
|
||||||
#include "json/json_reader.cpp"
|
#include "json/json_reader.cpp"
|
||||||
#include "json/json_value.cpp"
|
#include "json/json_value.cpp"
|
||||||
#include "json/json_writer.cpp"
|
#include "json/json_writer.cpp"
|
||||||
|
|
||||||
|
|||||||
@@ -32,8 +32,31 @@
|
|||||||
#ifndef RIPPLE_JSON_H
|
#ifndef RIPPLE_JSON_H
|
||||||
#define RIPPLE_JSON_H
|
#define RIPPLE_JSON_H
|
||||||
|
|
||||||
|
// VFALCO: TODO Remove unneeded includes
|
||||||
|
#include <cassert>
|
||||||
|
//#include <cstdlib>
|
||||||
|
#include <deque>
|
||||||
|
//#include <iostream>
|
||||||
|
#include <stack>
|
||||||
|
//#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
// Needed before these cpptl includes
|
||||||
|
#include "json/json_config.h"
|
||||||
|
|
||||||
|
#ifndef JSON_USE_CPPTL_SMALLMAP
|
||||||
|
# include <map>
|
||||||
|
#else
|
||||||
|
# include <cpptl/smallmap.h>
|
||||||
|
#endif
|
||||||
|
#ifdef JSON_USE_CPPTL
|
||||||
|
# include <cpptl/forwards.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "json/json_forwards.h"
|
||||||
|
#include "json/json_features.h"
|
||||||
|
#include "json/json_value.h"
|
||||||
#include "json/json_reader.h"
|
#include "json/json_reader.h"
|
||||||
#include "json/json_writer.h"
|
#include "json/json_writer.h"
|
||||||
#include "json/json_value.h"
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user