public static String toJson(String blobId, Map<String, String> metadata) throws JSONException {
    JSONObject jsonObject = new JSONObject();
    jsonObject.put(BLOB_ID_FIELD, blobId);
    if (!metadata.isEmpty()) {
      jsonObject.put(METADATA_FIELD, metadata);
    }
    return jsonObject.toString();
  }
@param blobId the blob ID to include in the JSON string.
@param metadata additional parameters to include in the JSON string.
@return a JSON string containing the blob ID and additional parameters.
@throws JSONException
ambry-frontend/src/main/java/com/github/ambry/frontend/SignedIdSerDe.java