Package org.hl7.fhir.utilities.json
Class JSONUtil
- java.lang.Object
-
- org.hl7.fhir.utilities.json.JSONUtil
-
-
Constructor Summary
Constructors Constructor Description JSONUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.google.gson.JsonObjectaddObj(com.google.gson.JsonArray arr)static booleanbool(com.google.gson.JsonObject json, String name)static com.google.gson.JsonObjectfindByStringProp(com.google.gson.JsonArray arr, String prop, String value)static com.google.gson.JsonArrayforceArray(com.google.gson.JsonObject obj, String name)static com.google.gson.JsonObjectforceObject(com.google.gson.JsonObject obj, String name)static booleanhas(com.google.gson.JsonObject json, String name1, String name2)static voidmerge(com.google.gson.JsonObject source, com.google.gson.JsonObject target)static List<com.google.gson.JsonObject>objects(com.google.gson.JsonObject json, String name)static com.google.gson.JsonObjectparse(String json)static Stringstr(com.google.gson.JsonObject json, String name)static Stringstr(com.google.gson.JsonObject json, String name1, String name2)static Stringtype(com.google.gson.JsonElement e)
-
-
-
Constructor Detail
-
JSONUtil
public JSONUtil()
-
-
Method Detail
-
parse
public static com.google.gson.JsonObject parse(String json) throws IOException
- Throws:
IOException
-
forceObject
public static com.google.gson.JsonObject forceObject(com.google.gson.JsonObject obj, String name)
-
forceArray
public static com.google.gson.JsonArray forceArray(com.google.gson.JsonObject obj, String name)
-
addObj
public static com.google.gson.JsonObject addObj(com.google.gson.JsonArray arr)
-
findByStringProp
public static com.google.gson.JsonObject findByStringProp(com.google.gson.JsonArray arr, String prop, String value)
-
objects
public static List<com.google.gson.JsonObject> objects(com.google.gson.JsonObject json, String name)
-
merge
public static void merge(com.google.gson.JsonObject source, com.google.gson.JsonObject target)
-
-