
Package ca.uhn.fhir.util
Class JsonUtil
- java.lang.Object
-
- ca.uhn.fhir.util.JsonUtil
-
-
Constructor Summary
Constructors Constructor Description JsonUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
deserialize(String theInput, Class<T> theType)
Parse JSONstatic String
serialize(Object theInput)
Encode JSONstatic String
serialize(Object theInput, boolean thePrettyPrint)
Encode JSONstatic void
serialize(Object theInput, Writer theWriter)
Encode JSON
-
-
-
Constructor Detail
-
JsonUtil
public JsonUtil()
-
-
Method Detail
-
deserialize
public static <T> T deserialize(@Nonnull String theInput, @Nonnull Class<T> theType) throws IOException
Parse JSON- Throws:
IOException
-
serialize
public static String serialize(@Nonnull Object theInput) throws IOException
Encode JSON- Throws:
IOException
-
serialize
public static String serialize(@Nonnull Object theInput, boolean thePrettyPrint) throws IOException
Encode JSON- Throws:
IOException
-
serialize
public static void serialize(@Nonnull Object theInput, @Nonnull Writer theWriter) throws IOException
Encode JSON- Throws:
IOException
-
-