public final class JSONUtils extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
DEFAULT_DATE_PATTERN |
static String |
DEFAULT_DATE_TIME_PATTERN |
static String |
DEFAULT_TIME_PATTERN |
static String |
EMPTY_ARRAY_JSON |
static String |
EMPTY_JSON |
static com.jayway.jsonpath.ParseContext |
PARSE_CONTEXT |
| 构造器和说明 |
|---|
JSONUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> T |
extractJsonPathAsObject(com.jayway.jsonpath.DocumentContext ctx,
String jsonPath,
Class<T> type) |
static <T> T |
extractJsonPathAsObject(com.jayway.jsonpath.DocumentContext ctx,
String jsonPath,
com.jayway.jsonpath.TypeRef<T> typeRef) |
static <T> T |
extractJsonPathAsObject(Object argument,
String jsonPath) |
static <T> T |
extractJsonPathAsObject(Object argument,
String jsonPath,
Class<T> type) |
static <T> T |
extractJsonPathAsObject(Object argument,
String jsonPath,
com.jayway.jsonpath.TypeRef<T> typeRef) |
static <T> T |
extractJsonPathAsObject(String json,
String jsonPath) |
static <T> T |
extractJsonPathAsObject(String json,
String jsonPath,
Class<T> type) |
static <T> T |
extractJsonPathAsObject(String json,
String jsonPath,
com.jayway.jsonpath.TypeRef<T> typeRef) |
static Map<String,Object> |
fromJSON(byte[] bytes) |
static <E,T extends Collection> |
fromJSON(byte[] bytes,
Class<? extends Collection> collectionType,
Class<E> valueType) |
static <K,V,T extends Map<K,V>> |
fromJSON(byte[] bytes,
Class<? extends Map> mapType,
Class<K> keyType,
Class<V> valueType) |
static Map<String,Object> |
fromJSON(InputStream is) |
static <E,T extends Collection> |
fromJSON(InputStream inputStream,
Class<? extends Collection> collectionType,
Class<E> valueType) |
static <K,V,T extends Map<K,V>> |
fromJSON(InputStream inputStream,
Class<? extends Map> mapType,
Class<K> keyType,
Class<V> valueType) |
static Map<String,Object> |
fromJSON(String json) |
static <E,T extends Collection> |
fromJSON(String json,
Class<? extends Collection> collectionType,
Class<E> valueType) |
static <K,V,T extends Map<K,V>> |
fromJSON(String json,
Class<? extends Map> mapType,
Class<K> keyType,
Class<V> valueType) |
static <T> T |
fromJSON(String json,
Class<T> valueType) |
static <T> T |
fromJSON(String json,
com.fasterxml.jackson.databind.JavaType javaType) |
static com.fasterxml.jackson.databind.ObjectMapper |
getInstance() |
static String |
toJSON(Object obj) |
static String |
toPrettyJSON(Object obj) |
public static <T> T fromJSON(@Nullable String json, com.fasterxml.jackson.databind.JavaType javaType)
public static <E,T extends Collection> T fromJSON(String json, Class<? extends Collection> collectionType, Class<E> valueType)
public static <E,T extends Collection> T fromJSON(byte[] bytes, Class<? extends Collection> collectionType, Class<E> valueType)
public static <E,T extends Collection> T fromJSON(InputStream inputStream, Class<? extends Collection> collectionType, Class<E> valueType)
public static Map<String,Object> fromJSON(InputStream is)
public static <K,V,T extends Map<K,V>> T fromJSON(String json, Class<? extends Map> mapType, Class<K> keyType, Class<V> valueType)
public static <K,V,T extends Map<K,V>> T fromJSON(byte[] bytes, Class<? extends Map> mapType, Class<K> keyType, Class<V> valueType)
public static <K,V,T extends Map<K,V>> T fromJSON(InputStream inputStream, Class<? extends Map> mapType, Class<K> keyType, Class<V> valueType)
public static <T> T extractJsonPathAsObject(Object argument, String jsonPath)
public static <T> T extractJsonPathAsObject(Object argument, String jsonPath, com.jayway.jsonpath.TypeRef<T> typeRef)
public static <T> T extractJsonPathAsObject(String json, String jsonPath, com.jayway.jsonpath.TypeRef<T> typeRef)
public static <T> T extractJsonPathAsObject(com.jayway.jsonpath.DocumentContext ctx,
String jsonPath,
com.jayway.jsonpath.TypeRef<T> typeRef)
public static <T> T extractJsonPathAsObject(Object argument, String jsonPath, Class<T> type)
public static <T> T extractJsonPathAsObject(String json, String jsonPath, Class<T> type)
public static <T> T extractJsonPathAsObject(com.jayway.jsonpath.DocumentContext ctx,
String jsonPath,
Class<T> type)
public static com.fasterxml.jackson.databind.ObjectMapper getInstance()
Copyright © 2023 wuyushuo. All rights reserved.