Package ejava.examples.ejbwar.jaxrs
Class JSONUtils
- java.lang.Object
-
- ejava.examples.ejbwar.jaxrs.JSONUtils
-
-
Constructor Summary
Constructors Constructor Description JSONUtils()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Jsonb
getContext(Class<?> type)
private static JSONUtils
getInstance()
static <T> String
marshal(T object)
static <T> T
unmarshal(String string, Class<T> type)
static <T> T
unmarshall(InputStream is, Class<T> type)
-
-
-
Method Detail
-
getContext
public Jsonb getContext(Class<?> type)
- Specified by:
getContext
in interfacejavax.ws.rs.ext.ContextResolver<Jsonb>
-
getInstance
private static JSONUtils getInstance()
-
marshal
public static <T> String marshal(T object)
-
unmarshall
public static <T> T unmarshall(InputStream is, Class<T> type)
-
-