| 836 | } |
| 837 | |
| 838 | cm::string_view JsonTypeToString(Json::ValueType type) |
| 839 | { |
| 840 | switch (type) { |
| 841 | case Json::ValueType::nullValue: |
| 842 | return "NULL"_s; |
| 843 | case Json::ValueType::intValue: |
| 844 | case Json::ValueType::uintValue: |
| 845 | case Json::ValueType::realValue: |
| 846 | return "NUMBER"_s; |
| 847 | case Json::ValueType::stringValue: |
| 848 | return "STRING"_s; |
| 849 | case Json::ValueType::booleanValue: |
| 850 | return "BOOLEAN"_s; |
| 851 | case Json::ValueType::arrayValue: |
| 852 | return "ARRAY"_s; |
| 853 | case Json::ValueType::objectValue: |
| 854 | return "OBJECT"_s; |
| 855 | } |
| 856 | throw json_error("invalid JSON type found"); |
| 857 | } |
| 858 | |
| 859 | int ParseIndex( |
| 860 | std::string const& str, cm::optional<Args> const& progress = cm::nullopt, |
no test coverage detected
searching dependent graphs…