Class JsonUtils
java.lang.Object
io.fluxcapacitor.common.serialization.JsonUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]static Stringstatic StringasPrettyJson(Object object) static <T> TconvertValue(Object fromValue, com.fasterxml.jackson.core.type.TypeReference<T> typeRef) static <T> TconvertValue(Object fromValue, Class<? extends T> toValueType) static <T> TconvertValue(Object fromValue, Type toValueType) static <T> TconvertValue(Object fromValue, Function<com.fasterxml.jackson.databind.type.TypeFactory, com.fasterxml.jackson.databind.JavaType> typeFunction) static voiddisableJsonIgnore(com.fasterxml.jackson.databind.ObjectMapper mapper) static <T> Tstatic <T> TfromFile(Class<?> referencePoint, String fileName, com.fasterxml.jackson.databind.JavaType javaType) static <T> Tstatic <T> TfromFile(Class<?> referencePoint, String fileName, Function<com.fasterxml.jackson.databind.type.TypeFactory, com.fasterxml.jackson.databind.JavaType> typeFunction) static Objectstatic List<?> static <T> Tstatic <T> Tstatic <T> TfromFile(String fileName, Function<com.fasterxml.jackson.databind.type.TypeFactory, com.fasterxml.jackson.databind.JavaType> typeFunction) static <T> TfromFileAs(String fileName) static ObjectfromFileWith(String fileName, Map<String, Object> replaceValues) static <T> TfromJson(byte[] json) static <T> TfromJson(byte[] json, com.fasterxml.jackson.databind.JavaType type) static <T> Tstatic <T> Tstatic <T> TfromJson(byte[] json, Function<com.fasterxml.jackson.databind.type.TypeFactory, com.fasterxml.jackson.databind.JavaType> typeFunction) static <T> Tstatic <T> Tstatic <T> Tstatic <T> Tstatic <T> TfromJson(String json, Function<com.fasterxml.jackson.databind.type.TypeFactory, com.fasterxml.jackson.databind.JavaType> typeFunction) protected static StringgetContent(Class<?> referencePoint, String fileName) protected static StringgetContent(URI fileUri) static <T> Tstatic com.fasterxml.jackson.databind.node.ObjectNodenewObjectNode(Object... keyValues) static com.fasterxml.jackson.databind.JsonNodereadTree(byte[] jsonContent) static com.fasterxml.jackson.databind.JsonNodereadTree(InputStream jsonContent) static com.fasterxml.jackson.databind.JsonNodestatic com.fasterxml.jackson.databind.type.TypeFactorystatic <T extends com.fasterxml.jackson.databind.JsonNode>
TvalueToTree(Object object)
-
Field Details
-
writer
public static com.fasterxml.jackson.databind.json.JsonMapper writer -
reader
public static com.fasterxml.jackson.databind.json.JsonMapper reader
-
-
Constructor Details
-
JsonUtils
public JsonUtils()
-
-
Method Details
-
fromFile
-
fromFile
-
fromFile
-
getContent
-
getContent
-
fromFile
-
fromFile
-
fromFile
-
fromFile
-
fromFile
-
fromFile
-
fromFileAs
-
fromFileWith
-
fromJson
-
fromJson
-
fromJson
-
fromJson
-
fromJson
-
fromJson
-
fromJson
public static <T> T fromJson(byte[] json) -
fromJson
-
fromJson
public static <T> T fromJson(byte[] json, com.fasterxml.jackson.databind.JavaType type) -
fromJson
public static <T> T fromJson(byte[] json, Function<com.fasterxml.jackson.databind.type.TypeFactory, com.fasterxml.jackson.databind.JavaType> typeFunction) -
asJson
-
asPrettyJson
-
asBytes
-
convertValue
-
convertValue
-
convertValue
public static <T> T convertValue(Object fromValue, com.fasterxml.jackson.core.type.TypeReference<T> typeRef) -
convertValue
-
readTree
public static com.fasterxml.jackson.databind.JsonNode readTree(byte[] jsonContent) -
readTree
-
readTree
-
valueToTree
-
newObjectNode
-
merge
-
typeFactory
public static com.fasterxml.jackson.databind.type.TypeFactory typeFactory() -
disableJsonIgnore
public static void disableJsonIgnore(com.fasterxml.jackson.databind.ObjectMapper mapper)
-