| 113 | } |
| 114 | |
| 115 | int64_t UniValue::get_int64() const |
| 116 | { |
| 117 | if (typ != VNUM) |
| 118 | throw std::runtime_error("JSON value is not an integer as expected"); |
| 119 | int64_t retval; |
| 120 | if (!ParseInt64(getValStr(), &retval)) |
| 121 | throw std::runtime_error("JSON integer out of range"); |
| 122 | return retval; |
| 123 | } |
| 124 | |
| 125 | double UniValue::get_real() const |
| 126 | { |