Package com.ibm.fhir.model.util
Class JsonSupport
- java.lang.Object
-
- com.ibm.fhir.model.util.JsonSupport
-
public final class JsonSupport extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
checkForUnrecognizedElements(Class<?> type, jakarta.json.JsonObject jsonObject)
static Set<String>
getElementNames(Class<?> type)
static jakarta.json.JsonArray
getJsonArray(jakarta.json.JsonObject jsonObject, String key)
static jakarta.json.JsonArray
getJsonArray(jakarta.json.JsonObject jsonObject, String key, boolean primitive)
static jakarta.json.JsonValue
getJsonValue(jakarta.json.JsonArray jsonArray, int index)
static <T extends jakarta.json.JsonValue>
TgetJsonValue(jakarta.json.JsonObject jsonObject, String key, Class<T> expectedType)
static Set<String>
getRequiredElementNames(Class<?> type)
static Class<?>
getResourceType(jakarta.json.JsonObject jsonObject)
static Set<String>
getSummaryDataElementNames(Class<?> type)
static Set<String>
getSummaryElementNames(Class<?> type)
static void
init()
Calling this method allows us to load/initialize this class during startup.static InputStream
nonClosingInputStream(InputStream in)
static OutputStream
nonClosingOutputStream(OutputStream out)
static Reader
nonClosingReader(Reader reader)
static Writer
nonClosingWriter(Writer writer)
static jakarta.json.JsonObject
toJsonObject(Resource resource)
-
-
-
Method Detail
-
init
public static void init()
Calling this method allows us to load/initialize this class during startup.
-
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)
-
toJsonObject
public static jakarta.json.JsonObject toJsonObject(Resource resource) throws FHIRGeneratorException
- Throws:
FHIRGeneratorException
-
nonClosingInputStream
public static InputStream nonClosingInputStream(InputStream in)
-
nonClosingOutputStream
public static OutputStream nonClosingOutputStream(OutputStream out)
-
checkForUnrecognizedElements
public static void checkForUnrecognizedElements(Class<?> type, jakarta.json.JsonObject jsonObject)
-
getResourceType
public static Class<?> getResourceType(jakarta.json.JsonObject jsonObject)
-
-