Package io.jans.as.model.util
Class JsonUtil
java.lang.Object
io.jans.as.model.util.JsonUtil
- Author:
- Yuriy Z
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.json.JSONObject
filterOutNulls
(org.json.JSONObject json) Returns a json object representation of the given JSONObject, filtering out any keys whose value is null (i.e.static String
toStringWithoutNulls
(org.json.JSONObject json) Returns a string representation of the given JSONObject, filtering out any keys whose value is null (i.e.
-
Method Details
-
filterOutNulls
public static org.json.JSONObject filterOutNulls(org.json.JSONObject json) Returns a json object representation of the given JSONObject, filtering out any keys whose value is null (i.e. JSONObject.NULL).- Parameters:
json
- the original JSONObject- Returns:
- filtered JSONObject
-
toStringWithoutNulls
Returns a string representation of the given JSONObject, filtering out any keys whose value is null (i.e. JSONObject.NULL).- Parameters:
json
- the original JSONObject- Returns:
- the string representation of the filtered JSONObject
-