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:
committed by
Jack Grigg
parent
23f71dc740
commit
49a5df0ef3
@@ -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); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user