| 862 | } |
| 863 | |
| 864 | String Json::printJson(int pretty, bool sort) const { |
| 865 | if (type() != Type::Object && type() != Type::Array) |
| 866 | throw JsonException("printJson called on non-top-level JSON type"); |
| 867 | |
| 868 | return repr(pretty, sort); |
| 869 | } |
| 870 | |
| 871 | String Json::printString() const { |
| 872 | if (type() == Type::String) |