ObjectNode node = JsonNodeFactory.instance.objectNode();
node.put("default", defaultAccess);
ArrayNode limitsNode = node.putArray("limits");
for (Entry<String, Long> limit : limits.entrySet()) {
ObjectNode limitNode = limitsNode.addObject();
limitNode.put("store", limit.getKey());
limitNode.put("limit", limit.getValue());
}
return JsonFormat.serializeAsBytesSoft(node, "BlobStoreAccessConfig");