Package org.jboss.resteasy.jose.jws.util
Class JsonSerialization
- java.lang.Object
-
- org.jboss.resteasy.jose.jws.util.JsonSerialization
-
public class JsonSerialization extends Object
Copied from keycloak Any class that extends JsonWebToken will use NON_DEFAULT inclusion
-
-
Field Summary
Fields Modifier and Type Field Description static com.fasterxml.jackson.databind.ObjectMapper
mapper
-
Constructor Summary
Constructors Constructor Description JsonSerialization()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
readValue(byte[] bytes, Class<T> type)
static <T> T
readValue(InputStream bytes, Class<T> type)
static <T> T
readValue(String bytes, Class<T> type)
static byte[]
writeValueAsBytes(Object obj)
static String
writeValueAsString(Object obj)
-
-
-
Method Detail
-
writeValueAsString
public static String writeValueAsString(Object obj) throws IOException
- Throws:
IOException
-
writeValueAsBytes
public static byte[] writeValueAsBytes(Object obj) throws IOException
- Throws:
IOException
-
readValue
public static <T> T readValue(byte[] bytes, Class<T> type) throws IOException
- Throws:
IOException
-
readValue
public static <T> T readValue(String bytes, Class<T> type) throws IOException
- Throws:
IOException
-
readValue
public static <T> T readValue(InputStream bytes, Class<T> type) throws IOException
- Throws:
IOException
-
-