Class JsonUtils

java.lang.Object
io.fluxcapacitor.common.serialization.JsonUtils

public class JsonUtils extends 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

      public static Object fromFile(String fileName)
    • fromFile

      public static List<?> fromFile(String... fileNames)
    • fromFile

      public static <T> T fromFile(Class<?> referencePoint, String fileName)
    • getContent

      protected static String getContent(Class<?> referencePoint, String fileName)
    • getContent

      protected static String getContent(URI fileUri)
    • fromFile

      public static <T> T fromFile(String fileName, Class<T> type)
    • fromFile

      public static <T> T fromFile(String fileName, com.fasterxml.jackson.databind.JavaType javaType)
    • fromFile

      public static <T> T fromFile(String fileName, Function<com.fasterxml.jackson.databind.type.TypeFactory,com.fasterxml.jackson.databind.JavaType> typeFunction)
    • fromFile

      public static <T> T fromFile(Class<?> referencePoint, String fileName, Class<T> type)
    • fromFile

      public static <T> T fromFile(Class<?> referencePoint, String fileName, com.fasterxml.jackson.databind.JavaType javaType)
    • fromFile

      public static <T> T fromFile(Class<?> referencePoint, String fileName, Function<com.fasterxml.jackson.databind.type.TypeFactory,com.fasterxml.jackson.databind.JavaType> typeFunction)
    • fromFileAs

      public static <T> T fromFileAs(String fileName)
    • fromFileWith

      public static Object fromFileWith(String fileName, Map<String,Object> replaceValues)
    • fromJson

      public static <T> T fromJson(String json)
    • fromJson

      public static <T> T fromJson(String json, Class<T> type)
    • fromJson

      public static <T> T fromJson(String json, Type type)
    • fromJson

      public static <T> T fromJson(String json, com.fasterxml.jackson.databind.JavaType type)
    • fromJson

      public static <T> T fromJson(String json, Function<com.fasterxml.jackson.databind.type.TypeFactory,com.fasterxml.jackson.databind.JavaType> typeFunction)
    • fromJson

      public static <T> T fromJson(byte[] json, Class<T> type)
    • fromJson

      public static <T> T fromJson(byte[] json)
    • fromJson

      public static <T> T fromJson(byte[] json, Type type)
    • 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

      public static String asJson(Object object)
    • asPrettyJson

      public static String asPrettyJson(Object object)
    • asBytes

      public static byte[] asBytes(Object object)
    • convertValue

      public static <T> T convertValue(Object fromValue, Class<? extends T> toValueType)
    • convertValue

      public static <T> T convertValue(Object fromValue, Type toValueType)
    • convertValue

      public static <T> T convertValue(Object fromValue, com.fasterxml.jackson.core.type.TypeReference<T> typeRef)
    • convertValue

      public static <T> T convertValue(Object fromValue, Function<com.fasterxml.jackson.databind.type.TypeFactory,com.fasterxml.jackson.databind.JavaType> typeFunction)
    • readTree

      public static com.fasterxml.jackson.databind.JsonNode readTree(byte[] jsonContent)
    • readTree

      public static com.fasterxml.jackson.databind.JsonNode readTree(String jsonContent)
    • readTree

      public static com.fasterxml.jackson.databind.JsonNode readTree(InputStream jsonContent)
    • valueToTree

      public static <T extends com.fasterxml.jackson.databind.JsonNode> T valueToTree(Object object)
    • newObjectNode

      public static com.fasterxml.jackson.databind.node.ObjectNode newObjectNode(Object... keyValues)
    • merge

      public static <T> T merge(T base, Object update)
    • typeFactory

      public static com.fasterxml.jackson.databind.type.TypeFactory typeFactory()
    • disableJsonIgnore

      public static void disableJsonIgnore(com.fasterxml.jackson.databind.ObjectMapper mapper)