{
TProtocolReader reader = new TProtocolReader(protocol);
reader.readStructBegin();
Map<Short, Object> data = new HashMap<>(metadata.getFields().size());
while (reader.nextField()) {
short fieldId = reader.getFieldId();
// do we have a codec for this field
ThriftCodec<?> codec = fields.get(fieldId);
if (codec == null) {