public class SignedIdSerDe
extends java.lang.Object
IdSigningService
. Keep in mind that the strings
created by these methods are not URL-safe, signed, or encrypted, and that the IdSigningService
implementation
should choose how to handle these concerns.Constructor and Description |
---|
SignedIdSerDe() |
Modifier and Type | Method and Description |
---|---|
static com.github.ambry.utils.Pair<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
fromJson(java.lang.String jsonString) |
static java.lang.String |
toJson(java.lang.String blobId,
java.util.Map<java.lang.String,java.lang.String> metadata) |
public static java.lang.String toJson(java.lang.String blobId, java.util.Map<java.lang.String,java.lang.String> metadata) throws org.json.JSONException
blobId
- the blob ID to include in the JSON string.metadata
- additional parameters to include in the JSON string.org.json.JSONException
public static com.github.ambry.utils.Pair<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> fromJson(java.lang.String jsonString) throws org.json.JSONException
jsonString
- the JSON string to deserialize.Pair
that contains the blob ID and additional metadata parsed from the JSON string.org.json.JSONException