Package io.jans.as.model.util
Class JsonUtil
- java.lang.Object
-
- io.jans.as.model.util.JsonUtil
-
public class JsonUtil extends Object
- Author:
- Yuriy Z
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.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 Detail
-
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
public 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. JSONObject.NULL).- Parameters:
json
- the original JSONObject- Returns:
- the string representation of the filtered JSONObject
-
-