MCPcopy Index your code
hub / github.com/Kitware/CMake / JsonTypeToString

Function JsonTypeToString

Source/cmStringCommand.cxx:838–857  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

836}
837
838cm::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
859int ParseIndex(
860 std::string const& str, cm::optional<Args> const& progress = cm::nullopt,

Callers 2

HandleJSONCommandFunction · 0.85

Calls 1

json_errorClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…