public final class ValidateAndSerialize extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
deserializeJsonBytesToObj(byte[] bytes,
Class<T> valueType)
Deserialize the json byte array to an instance of class T
|
static <T> byte[] |
validateAndSerializeToJsonBytes(T object)
Validate And Serialize an instance of class T to Json byte.
|
public static <T> byte[] validateAndSerializeToJsonBytes(T object)
throws InvalidRequestException,
JsonProcessingException
T - instance classInvalidRequestException, - JsonProcessingExceptionInvalidRequestExceptionJsonProcessingExceptionpublic static <T> T deserializeJsonBytesToObj(byte[] bytes,
Class<T> valueType)
throws IOException
T - instance classbytes - byte array of datavalueType - instance class typeIOException