java.lang.Object
com.github.tomakehurst.wiremock.common.Json

public final class Json extends Object
  • Method Details

    • read

      public static <T> T read(byte[] stream, Class<T> clazz) throws IOException
      Throws:
      IOException
    • read

      public static <T> T read(String json, Class<T> clazz)
    • read

      public static <T> T read(String json, com.fasterxml.jackson.core.type.TypeReference<T> typeRef)
    • write

      public static <T> String write(T object)
    • writePrivate

      public static <T> String writePrivate(T object)
    • write

      public static <T> String write(T object, Class<?> view)
    • getObjectMapper

      public static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
    • toByteArray

      public static byte[] toByteArray(Object object)
    • node

      public static com.fasterxml.jackson.databind.JsonNode node(String json)
    • maxDeepSize

      public static int maxDeepSize(com.fasterxml.jackson.databind.JsonNode one, com.fasterxml.jackson.databind.JsonNode two)
    • deepSize

      public static int deepSize(com.fasterxml.jackson.databind.JsonNode node)
    • prettyPrint

      public static String prettyPrint(String json)
    • mapToObject

      public static <T> T mapToObject(Map<String,Object> map, Class<T> targetClass)
    • objectToMap

      public static <T> Map<String,Object> objectToMap(T theObject)
    • schemaPropertyCount

      public static int schemaPropertyCount(com.fasterxml.jackson.databind.JsonNode schema)