MCPcopy Create free account
hub / github.com/apache/thrift / readListBegin

Method readListBegin

lib/cpp/src/thrift/protocol/TJSONProtocol.cpp:1038–1053  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1036}
1037
1038uint32_t TJSONProtocol::readListBegin(TType& elemType, uint32_t& size) {
1039 uint64_t tmpVal = 0;
1040 std::string tmpStr;
1041 uint32_t result = readJSONArrayStart();
1042 result += readJSONString(tmpStr);
1043 elemType = getTypeIDForTypeName(tmpStr);
1044 result += readJSONInteger(tmpVal);
1045 if (tmpVal > (std::numeric_limits<uint32_t>::max)())
1046 throw TProtocolException(TProtocolException::SIZE_LIMIT);
1047 size = static_cast<uint32_t>(tmpVal);
1048
1049 TList list(elemType, size);
1050 checkReadBytesAvailable(list);
1051
1052 return result;
1053}
1054
1055uint32_t TJSONProtocol::readListEnd() {
1056 return readJSONArrayEnd();

Callers

nothing calls this directly

Calls 2

getTypeIDForTypeNameFunction · 0.85
TProtocolExceptionClass · 0.70

Tested by

no test coverage detected