Class JsonSupport


  • public final class JsonSupport
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void checkForUnrecognizedElements​(java.lang.Class<?> type, jakarta.json.JsonObject jsonObject)  
      static java.util.Set<java.lang.String> getElementNames​(java.lang.Class<?> type)  
      static jakarta.json.JsonArray getJsonArray​(jakarta.json.JsonObject jsonObject, java.lang.String key)  
      static jakarta.json.JsonArray getJsonArray​(jakarta.json.JsonObject jsonObject, java.lang.String key, boolean primitive)  
      static jakarta.json.JsonValue getJsonValue​(jakarta.json.JsonArray jsonArray, int index)  
      static <T extends jakarta.json.JsonValue>
      T
      getJsonValue​(jakarta.json.JsonObject jsonObject, java.lang.String key, java.lang.Class<T> expectedType)  
      static java.util.Set<java.lang.String> getRequiredElementNames​(java.lang.Class<?> type)  
      static java.lang.Class<?> getResourceType​(jakarta.json.JsonObject jsonObject)  
      static java.util.Set<java.lang.String> getSummaryDataElementNames​(java.lang.Class<?> type)  
      static java.util.Set<java.lang.String> getSummaryElementNames​(java.lang.Class<?> type)  
      static void init()
      Calling this method allows us to load/initialize this class during startup.
      static java.io.InputStream nonClosingInputStream​(java.io.InputStream in)  
      static java.io.OutputStream nonClosingOutputStream​(java.io.OutputStream out)  
      static java.io.Reader nonClosingReader​(java.io.Reader reader)  
      static java.io.Writer nonClosingWriter​(java.io.Writer writer)  
      static jakarta.json.JsonObject toJsonObject​(Resource resource)  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • init

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

        public static java.util.Set<java.lang.String> getElementNames​(java.lang.Class<?> type)
      • getSummaryElementNames

        public static java.util.Set<java.lang.String> getSummaryElementNames​(java.lang.Class<?> type)
      • getSummaryDataElementNames

        public static java.util.Set<java.lang.String> getSummaryDataElementNames​(java.lang.Class<?> type)
      • getRequiredElementNames

        public static java.util.Set<java.lang.String> getRequiredElementNames​(java.lang.Class<?> type)
      • getJsonArray

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

        public static jakarta.json.JsonArray getJsonArray​(jakarta.json.JsonObject jsonObject,
                                                          java.lang.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,
                                                                        java.lang.String key,
                                                                        java.lang.Class<T> expectedType)
      • nonClosingReader

        public static java.io.Reader nonClosingReader​(java.io.Reader reader)
      • nonClosingInputStream

        public static java.io.InputStream nonClosingInputStream​(java.io.InputStream in)
      • nonClosingWriter

        public static java.io.Writer nonClosingWriter​(java.io.Writer writer)
      • nonClosingOutputStream

        public static java.io.OutputStream nonClosingOutputStream​(java.io.OutputStream out)
      • checkForUnrecognizedElements

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

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