univalue: add support for real, fix percision and make it json_spirit compatible

- avoid breaking the API because of different number/percision handling
This commit is contained in:
Jonas Schnelli
2015-05-10 15:53:54 +02:00
committed by Jack Grigg
parent 23f71dc740
commit 49a5df0ef3
5 changed files with 25 additions and 10 deletions

View File

@@ -17,7 +17,7 @@
class UniValue {
public:
enum VType { VNULL, VOBJ, VARR, VSTR, VNUM, VBOOL, };
enum VType { VNULL, VOBJ, VARR, VSTR, VNUM, VREAL, VBOOL, };
UniValue() { typ = VNULL; }
UniValue(UniValue::VType initialType, const std::string& initialStr = "") {
@@ -76,6 +76,7 @@ public:
bool isBool() const { return (typ == VBOOL); }
bool isStr() const { return (typ == VSTR); }
bool isNum() const { return (typ == VNUM); }
bool isReal() const { return (typ == VREAL); }
bool isArray() const { return (typ == VARR); }
bool isObject() const { return (typ == VOBJ); }