Package org.json.simple
Interface Jsonable
-
- All Known Implementing Classes:
JsonArray
,JsonObject
public interface Jsonable
Jsonables can be serialized in java script object notation (JSON). Deserializing a String produced by a Jsonable should represent the Jsonable in JSON form.- Since:
- 2.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
toJson()
Serialize to a JSON formatted string.void
toJson(Writer writable)
Serialize to a JSON formatted stream.
-
-
-
Method Detail
-
toJson
String toJson()
Serialize to a JSON formatted string.- Returns:
- a string, formatted in JSON, that represents the Jsonable.
-
toJson
void toJson(Writer writable) throws IOException
Serialize to a JSON formatted stream.- Parameters:
writable
- where the resulting JSON text should be sent.- Throws:
IOException
- when the writable encounters an I/O error.
-
-