public interface JsonUtil
| Modifier and Type | Method and Description |
|---|---|
List<Object> |
classpathToList(String classPath) |
Map<String,Object> |
classpathToMap(String classPath) |
Object |
classpathToObject(String classPath) |
<T> T |
classpathToType(String classPath,
Class<T> aClass) |
<T> T |
classpathToType(String classPath,
com.fasterxml.jackson.core.type.TypeReference<T> typeRef) |
Object |
cloneJson(Object obj)
Makes a deep copy of a Map
|
List<Object> |
filepathToList(String filePath) |
Map<String,Object> |
filepathToMap(String filePath) |
Object |
filepathToObject(String filePath) |
<T> T |
fileToType(String filePath,
Class<T> aClass) |
<T> T |
fileToType(String filePath,
com.fasterxml.jackson.core.type.TypeReference<T> typeRef) |
<T> T |
jsonTo(InputStream in,
com.fasterxml.jackson.core.type.TypeReference<T> typeRef)
Deprecated.
|
<T> T |
jsonTo(String json,
com.fasterxml.jackson.core.type.TypeReference<T> typeRef)
Deprecated.
|
List<Object> |
jsonToList(InputStream in) |
List<Object> |
jsonToList(String json) |
List<Object> |
jsonToList(String json,
String charset) |
Map<String,Object> |
jsonToMap(InputStream in) |
Map<String,Object> |
jsonToMap(String json) |
Map<String,Object> |
jsonToMap(String json,
String charset) |
Object |
jsonToObject(InputStream in) |
Object |
jsonToObject(String json) |
Object |
jsonToObject(String json,
String charset) |
<T> T |
streamToType(InputStream in,
Class<T> aClass) |
<T> T |
streamToType(InputStream in,
com.fasterxml.jackson.core.type.TypeReference<T> typeRef) |
<T> T |
stringToType(String json,
Class<T> aClass) |
<T> T |
stringToType(String json,
com.fasterxml.jackson.core.type.TypeReference<T> typeRef) |
String |
toJsonString(Object obj) |
String |
toPrettyJsonString(Object obj) |
Object jsonToObject(InputStream in)
Map<String,Object> jsonToMap(InputStream in)
List<Object> jsonToList(InputStream in)
@Deprecated <T> T jsonTo(String json, com.fasterxml.jackson.core.type.TypeReference<T> typeRef)
@Deprecated <T> T jsonTo(InputStream in, com.fasterxml.jackson.core.type.TypeReference<T> typeRef)
<T> T stringToType(String json, com.fasterxml.jackson.core.type.TypeReference<T> typeRef)
<T> T classpathToType(String classPath, com.fasterxml.jackson.core.type.TypeReference<T> typeRef)
<T> T fileToType(String filePath, com.fasterxml.jackson.core.type.TypeReference<T> typeRef)
<T> T streamToType(InputStream in, com.fasterxml.jackson.core.type.TypeReference<T> typeRef)
<T> T streamToType(InputStream in, Class<T> aClass)
Copyright © 2023. All rights reserved.