| 123 | } |
| 124 | |
| 125 | double UniValue::get_real() const |
| 126 | { |
| 127 | if (typ != VNUM) |
| 128 | throw std::runtime_error("JSON value is not a number as expected"); |
| 129 | double retval; |
| 130 | if (!ParseDouble(getValStr(), &retval)) |
| 131 | throw std::runtime_error("JSON double out of range"); |
| 132 | return retval; |
| 133 | } |
| 134 | |
| 135 | const UniValue& UniValue::get_obj() const |
| 136 | { |