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, javax.json.JsonObject jsonObject)
static Set<String>
getElementNames(Class<?> type)
static javax.json.JsonArray
getJsonArray(javax.json.JsonObject jsonObject, String key)
static javax.json.JsonArray
getJsonArray(javax.json.JsonObject jsonObject, String key, boolean primitive)
static javax.json.JsonValue
getJsonValue(javax.json.JsonArray jsonArray, int index)
static <T extends javax.json.JsonValue>
TgetJsonValue(javax.json.JsonObject jsonObject, String key, Class<T> expectedType)
static Set<String>
getRequiredElementNames(Class<?> type)
static Class<?>
getResourceType(javax.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 javax.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 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)
-
toJsonObject
public static javax.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, javax.json.JsonObject jsonObject)
-
getResourceType
public static Class<?> getResourceType(javax.json.JsonObject jsonObject)
-
-