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 javax.json.JsonArray getJsonArray​(javax.json.JsonObject jsonObject,
                                                        String key)
      • getJsonArray

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

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

        public static <T extends javax.json.JsonValue> T getJsonValue​(javax.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,
                                                        javax.json.JsonObject jsonObject)
      • getResourceType

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