public final class JsonUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
APPLICATION_JSON |
static javax.ws.rs.core.MediaType |
APPLICATION_JSON_TYPE |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
fromBytes(byte[] data,
Class<T> type) |
static <T> T |
fromString(String content,
Class<T> type) |
static <T> T |
readBytes(InputStream input,
Class<T> type) |
static byte[] |
toBytes(Object value) |
static String |
toString(Object value) |
static void |
writeBytes(OutputStream output,
Object value) |
public static final String APPLICATION_JSON
public static final javax.ws.rs.core.MediaType APPLICATION_JSON_TYPE
public static byte[] toBytes(Object value)
public static <T> T fromBytes(byte[] data,
Class<T> type)
public static void writeBytes(OutputStream output, Object value)
public static <T> T readBytes(InputStream input, Class<T> type)
Copyright © 2015. All rights reserved.