| 697 | } |
| 698 | |
| 699 | UInt64 JSON::toUInt() const |
| 700 | { |
| 701 | ElementType type = getType(); |
| 702 | |
| 703 | if (type == TYPE_NUMBER) |
| 704 | return getUInt(); |
| 705 | if (type == TYPE_STRING) |
| 706 | return JSON(ptr_begin + 1, ptr_end, level + 1).getUInt(); |
| 707 | throw JSONException("JSON: cannot convert value to unsigned integer."); |
| 708 | } |
| 709 | |
| 710 | std::string JSON::toString() const |
| 711 | { |