| 1057 | } |
| 1058 | |
| 1059 | uint32_t TJSONProtocol::readSetBegin(TType& elemType, uint32_t& size) { |
| 1060 | uint64_t tmpVal = 0; |
| 1061 | std::string tmpStr; |
| 1062 | uint32_t result = readJSONArrayStart(); |
| 1063 | result += readJSONString(tmpStr); |
| 1064 | elemType = getTypeIDForTypeName(tmpStr); |
| 1065 | result += readJSONInteger(tmpVal); |
| 1066 | if (tmpVal > (std::numeric_limits<uint32_t>::max)()) |
| 1067 | throw TProtocolException(TProtocolException::SIZE_LIMIT); |
| 1068 | size = static_cast<uint32_t>(tmpVal); |
| 1069 | |
| 1070 | TSet set(elemType, size); |
| 1071 | checkReadBytesAvailable(set); |
| 1072 | |
| 1073 | return result; |
| 1074 | } |
| 1075 | |
| 1076 | uint32_t TJSONProtocol::readSetEnd() { |
| 1077 | return readJSONArrayEnd(); |
nothing calls this directly
no test coverage detected