Class JsonSupport


  • public final class JsonSupport
    extends Object
    • Method Detail

      • init

        public static void init()
        Calling this method allows us to load/initialize this class during startup.
      • getElementNames

        public static Set<String> getElementNames​(Class<?> type)
      • getSummaryElementNames

        public static Set<String> getSummaryElementNames​(Class<?> type)
      • getSummaryDataElementNames

        public static Set<String> getSummaryDataElementNames​(Class<?> type)
      • getRequiredElementNames

        public static Set<String> getRequiredElementNames​(Class<?> type)
      • getJsonArray

        public static jakarta.json.JsonArray getJsonArray​(jakarta.json.JsonObject jsonObject,
                                                          String key)
      • getJsonArray

        public static jakarta.json.JsonArray getJsonArray​(jakarta.json.JsonObject jsonObject,
                                                          String key,
                                                          boolean primitive)
      • getJsonValue

        public static jakarta.json.JsonValue getJsonValue​(jakarta.json.JsonArray jsonArray,
                                                          int index)
      • getJsonValue

        public static <T extends jakarta.json.JsonValue> T getJsonValue​(jakarta.json.JsonObject jsonObject,
                                                                        String key,
                                                                        Class<T> expectedType)
      • nonClosingReader

        public static Reader nonClosingReader​(Reader reader)
      • nonClosingWriter

        public static Writer nonClosingWriter​(Writer writer)
      • checkForUnrecognizedElements

        public static void checkForUnrecognizedElements​(Class<?> type,
                                                        jakarta.json.JsonObject jsonObject)
      • getResourceType

        public static Class<?> getResourceType​(jakarta.json.JsonObject jsonObject)