| 985 | } |
| 986 | |
| 987 | uint32_t TJSONProtocol::readFieldBegin(std::string& name, TType& fieldType, int16_t& fieldId) { |
| 988 | (void)name; |
| 989 | uint32_t result = 0; |
| 990 | // Check if we hit the end of the list |
| 991 | uint8_t ch = reader_.peek(); |
| 992 | if (ch == kJSONObjectEnd) { |
| 993 | fieldType = apache::thrift::protocol::T_STOP; |
| 994 | } else { |
| 995 | uint64_t tmpVal = 0; |
| 996 | std::string tmpStr; |
| 997 | result += readJSONInteger(tmpVal); |
| 998 | if (tmpVal > static_cast<uint32_t>((std::numeric_limits<int16_t>::max)())) |
| 999 | throw TProtocolException(TProtocolException::SIZE_LIMIT); |
| 1000 | fieldId = static_cast<int16_t>(tmpVal); |
| 1001 | result += readJSONObjectStart(); |
| 1002 | result += readJSONString(tmpStr); |
| 1003 | fieldType = getTypeIDForTypeName(tmpStr); |
| 1004 | } |
| 1005 | return result; |
| 1006 | } |
| 1007 | |
| 1008 | uint32_t TJSONProtocol::readFieldEnd() { |
| 1009 | return readJSONObjectEnd(); |
nothing calls this directly
no test coverage detected