Package ca.uhn.fhir.util
Class JsonUtil
java.lang.Object
ca.uhn.fhir.util.JsonUtil
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider
static final com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider
static final com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
deserialize
(InputStream theInput, Class<T> theType) Parse JSONstatic <T> T
deserialize
(String theInput, Class<T> theType) Parse JSONstatic <T> List
<T> deserializeList
(String theInput, Class<T> theType) Parse JSONcom.fasterxml.jackson.databind.ser.FilterProvider
static String
Encode JSONstatic String
Encode JSONstatic void
Encode JSONstatic String
serializeOrInvalidRequest
(IModelJson theJson) static String
serializeWithSensitiveData
(IModelJson theInput) Includes fields which are annotated withSensitiveNoDisplay
.
-
Field Details
-
SIMPLE_BEAN_PROPERTY_FILTER
public static final com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter SIMPLE_BEAN_PROPERTY_FILTER -
SENSITIVE_DATA_FILTER_PROVIDER
public static final com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider SENSITIVE_DATA_FILTER_PROVIDER -
SHOW_ALL_DATA_FILTER_PROVIDER
public static final com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider SHOW_ALL_DATA_FILTER_PROVIDER
-
-
Constructor Details
-
JsonUtil
public JsonUtil()
-
-
Method Details
-
deserialize
Parse JSON -
deserializeList
public static <T> List<T> deserializeList(@Nonnull String theInput, @Nonnull Class<T> theType) throws IOException Parse JSON- Throws:
IOException
-
deserialize
public static <T> T deserialize(@Nonnull InputStream theInput, @Nonnull Class<T> theType) throws IOException Parse JSON- Throws:
IOException
-
serializeWithSensitiveData
Includes fields which are annotated withSensitiveNoDisplay
. Currently only meant to be used for serialization for batch job parameters. -
serialize
Encode JSON -
serialize
Encode JSON -
getSensitiveDataFilterProvider
-
serialize
public static void serialize(@Nonnull Object theInput, @Nonnull Writer theWriter) throws IOException Encode JSON- Throws:
IOException
-
serializeOrInvalidRequest
-