Convert tree to using univalue. Eliminate all json_spirit uses.

This commit is contained in:
Jeff Garzik
2014-08-20 15:15:16 -04:00
committed by Jack Grigg
parent 03912600e8
commit ed21d5bd4b
23 changed files with 320 additions and 204 deletions

View File

@@ -16,9 +16,8 @@
#include <string>
#include <memory>
#include "json/json_spirit_reader_template.h"
#include "json/json_spirit_utils.h"
#include "json/json_spirit_writer_template.h"
#include <boost/function.hpp>
#include "json_spirit_wrapper.h"
class AsyncRPCQueue;
class CRPCCommand;
@@ -79,12 +78,13 @@ bool RPCIsInWarmup(std::string *statusOut);
*/
void RPCTypeCheck(const json_spirit::Array& params,
const std::list<json_spirit::Value_type>& typesExpected, bool fAllowNull=false);
/**
* Check for expected keys/value types in an Object.
* Use like: RPCTypeCheck(object, boost::assign::map_list_of("name", str_type)("value", int_type));
*/
void RPCTypeCheck(const json_spirit::Object& o,
const std::map<std::string, json_spirit::Value_type>& typesExpected, bool fAllowNull=false);
/*
Check for expected keys/value types in an Object.
Use like: RPCTypeCheckObj(object, boost::assign::map_list_of("name", str_type)("value", int_type));
*/
void RPCTypeCheckObj(const UniValue& o,
const std::map<std::string, UniValue::VType>& typesExpected, bool fAllowNull=false);
/**
* Run func nSeconds from now. Uses boost deadline timers.