Package com.adyen.model.balanceplatform
Class JSONObject
- java.lang.Object
-
- com.adyen.model.balanceplatform.JSONObject
-
public class JSONObject extends Object
JSONObject
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJSONObject.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_PATHSstatic StringSERIALIZED_NAME_ROOT_PATH
-
Constructor Summary
Constructors Constructor Description JSONObject()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JSONObjectaddPathsItem(JSONPath pathsItem)booleanequals(Object o)static JSONObjectfromJson(String jsonString)Create an instance of JSONObject given an JSON stringList<JSONPath>getPaths()Get pathsJSONPathgetRootPath()Get rootPathinthashCode()JSONObjectpaths(List<JSONPath> paths)JSONObjectrootPath(JSONPath rootPath)voidsetPaths(List<JSONPath> paths)voidsetRootPath(JSONPath rootPath)StringtoJson()Convert an instance of JSONObject to an JSON stringStringtoString()static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj, boolean strictValidation)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_PATHS
public static final String SERIALIZED_NAME_PATHS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ROOT_PATH
public static final String SERIALIZED_NAME_ROOT_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
paths
public JSONObject paths(List<JSONPath> paths)
-
addPathsItem
public JSONObject addPathsItem(JSONPath pathsItem)
-
rootPath
public JSONObject rootPath(JSONPath rootPath)
-
getRootPath
public JSONPath getRootPath()
Get rootPath- Returns:
- rootPath
-
setRootPath
public void setRootPath(JSONPath rootPath)
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOException- Throws:
IOException
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj, boolean strictValidation) throws IOExceptionValidates the JSON Object and throws an exception if issues found- Parameters:
jsonObj- JSON ObjectstrictValidation- reject (new) fields missing from the specifications- Throws:
IOException- if the JSON Object is invalid with respect to JSONObject
-
fromJson
public static JSONObject fromJson(String jsonString) throws IOException
Create an instance of JSONObject given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of JSONObject
- Throws:
IOException- if the JSON string is invalid with respect to JSONObject
-
toJson
public String toJson()
Convert an instance of JSONObject to an JSON string- Returns:
- JSON string
-
-