@Override
 public User decodeFromWire(int pos, Buffer buffer) {
   int length = buffer.getInt(pos);
   pos += 4;
   byte[] encoded = buffer.getBytes(pos, pos + length);
   String str = new String(encoded, CharsetUtil.UTF_8);
   return JsonUtils.decode(str, User.class);
 }
 @Override
 public User transform(String entries) {
   return JsonUtils.decode(entries, User.class);
 }