| 1010 | } |
| 1011 | |
| 1012 | uint32_t TJSONProtocol::readMapBegin(TType& keyType, TType& valType, uint32_t& size) { |
| 1013 | uint64_t tmpVal = 0; |
| 1014 | std::string tmpStr; |
| 1015 | uint32_t result = readJSONArrayStart(); |
| 1016 | result += readJSONString(tmpStr); |
| 1017 | keyType = getTypeIDForTypeName(tmpStr); |
| 1018 | result += readJSONString(tmpStr); |
| 1019 | valType = getTypeIDForTypeName(tmpStr); |
| 1020 | result += readJSONInteger(tmpVal); |
| 1021 | if (tmpVal > (std::numeric_limits<uint32_t>::max)()) |
| 1022 | throw TProtocolException(TProtocolException::SIZE_LIMIT); |
| 1023 | size = static_cast<uint32_t>(tmpVal); |
| 1024 | result += readJSONObjectStart(); |
| 1025 | |
| 1026 | TMap map(keyType, valType, size); |
| 1027 | checkReadBytesAvailable(map); |
| 1028 | |
| 1029 | return result; |
| 1030 | } |
| 1031 | |
| 1032 | uint32_t TJSONProtocol::readMapEnd() { |
| 1033 | uint32_t result = readJSONObjectEnd(); |
nothing calls this directly
no test coverage detected