java.lang.Object
de.ralleytn.simple.json.serialization.JSONSerializer
Provides static methods which allow you to convert Java objects into JSONObjects
and the other way around.
- Since:
- 1.0.0
- Version:
- 2.1.0
- Author:
- Ralph Niemitz/RalleYTN(ralph.niemitz@gmx.de)
-
Method Summary
Modifier and TypeMethodDescriptionstatic final void
deserialize
(JSONObject json, Object object) Transfers the data of JSONObject into a Java object.static final JSONObject
Converts a Java object into a JSONObject.
-
Method Details
-
deserialize
Transfers the data of JSONObject into a Java object.- Parameters:
json
- the JSON object containing the dataobject
- the body of the Java object that should be filled- Throws:
Exception
- if an error occurs- Since:
- 1.0.0
-
serialize
Converts a Java object into a JSONObject.- Parameters:
object
- the Java object you want to convert- Returns:
- the resulting JSONObject
- Throws:
Exception
- if an error occurs- Since:
- 1.0.0
-