public static ObjectNode serializeToJsonObject(PutBlobMetaInfo metaInfo) {
    ObjectNode rootObject = objectMapper.createObjectNode();
    // The order of elements in JSON arrays is preserved.
    // https://www.rfc-editor.org/rfc/rfc7159.html
    // An object is an unordered collection of zero or more name/value pairs
    // An array is an ordered sequence of zero or more values.
    ArrayNode chunks = objectMapper.createArrayNode();
    for (Pair<String, Long> blobAndSize : metaInfo.orderedChunkIdSizeList) {
      chunks.add(objectMapper.createObjectNode().put(BLOB, blobAndSize.getFirst()).put(SIZE, blobAndSize.getSecond()));
    }
    rootObject.put(CHUNKS, chunks);
    rootObject.put(RESERVED_METADATA_CHUNK_ID, metaInfo.reservedMetadataChunkId);

    return rootObject;
  }
Serialize a {@link PutBlobMetaInfo} object to a JSON Object
@param metaInfo the {@link PutBlobMetaInfo}
@return the JSON object
ambry-api/src/main/java/com/github/ambry/frontend/PutBlobMetaInfo.java