@Override
    public StructLikeMap<T> deserialize(ByteBuffer buffer) {
      try {
        StructLikeMap<T> results = StructLikeMap.create(spec.partitionType());
        ObjectMapper objectMapper = new ObjectMapper();
        MapLikeType mapLikeType =
            objectMapper
                .getTypeFactory()
                .constructMapLikeType(Map.class, String.class, valueClassType);

        Map<String, T> map = objectMapper.readValue(new String(buffer.array()), mapLikeType);
        for (String key : map.keySet()) {
          if (spec.isUnpartitioned()) {
            results.put(TablePropertyUtil.EMPTY_STRUCT, map.get(key));
          } else {
            StructLike partitionData = MixedDataFiles.data(spec, key);
            results.put(partitionData, map.get(key));
          }
        }
        return results;
      } catch (JsonProcessingException e) {
        throw new UnsupportedOperationException("Failed to decode partition data ", e);
      }
    }
A serializer to serialize and deserialize data between ByteBuffer and Type T.

@param <T> - the class type of the data
amoro-format-iceberg/src/main/java/org/apache/amoro/utils/StatisticsFileUtil.java