public static byte[] serializeContainersInJson(Collection<Container> containers) throws IOException {
    Map<String, Collection<Container>> resultObj = new HashMap<>();
    resultObj.put(Account.CONTAINERS_KEY, containers);
    return objectMapper.writeValueAsBytes(resultObj);
  }
Serialize a collection of containers to json bytes that can be used in requests/responses.
@param containers the {@link Container}s to serialize.
@return the serialized bytes in json format.
ambry-api/src/main/java/com/github/ambry/account/AccountCollectionSerde.java