Class JsonUtil

java.lang.Object
org.cloudburstmc.server.timings.JsonUtil

public class JsonUtil extends Object
Author:
Tee7even

Various methods for more compact JSON object constructing

  • Constructor Details

    • JsonUtil

      public JsonUtil()
  • Method Details

    • toArray

      public static com.fasterxml.jackson.databind.node.ArrayNode toArray(Object... objects)
    • toObject

      public static com.fasterxml.jackson.databind.JsonNode toObject(Object object)
    • mapToObject

      public static <E> com.fasterxml.jackson.databind.JsonNode mapToObject(Iterable<E> collection, Function<E,​JsonUtil.JSONPair> mapper)
    • mapToArray

      public static <E> com.fasterxml.jackson.databind.node.ArrayNode mapToArray(E[] elements, Function<E,​Object> mapper)
    • mapToArray

      public static <E> com.fasterxml.jackson.databind.node.ArrayNode mapToArray(Iterable<E> collection, Function<E,​Object> mapper)