MCPcopy Create free account
hub / github.com/apache/arrow / JsonTypeName

Function JsonTypeName

cpp/src/arrow/json/from_string.cc:67–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65constexpr auto kParseFlags = rj::kParseFullPrecisionFlag | rj::kParseNanAndInfFlag;
66
67const char* JsonTypeName(rj::Type json_type) {
68 switch (json_type) {
69 case rapidjson::kNullType:
70 return "null";
71 case rapidjson::kFalseType:
72 return "false";
73 case rapidjson::kTrueType:
74 return "true";
75 case rapidjson::kObjectType:
76 return "object";
77 case rapidjson::kArrayType:
78 return "array";
79 case rapidjson::kStringType:
80 return "string";
81 case rapidjson::kNumberType:
82 return "number";
83 default:
84 return "unknown";
85 }
86}
87
88Status JSONTypeError(const char* expected_type, rj::Type json_type) {
89 return Status::Invalid("Expected ", expected_type, " or null, got JSON type ",

Callers 1

JSONTypeErrorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected