Package ch.epfl.cs107.play.data.json
Class JSONString
java.lang.Object
ch.epfl.cs107.play.data.json.JSONValue
ch.epfl.cs107.play.data.json.JSONString
Used to represent json strings, ints, doubles and booleans
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
JSONString
Creates a new JSONString with the given value- Parameters:
value- (String): The value of the string
-
-
Method Details
-
set
Sets the value of this object- Parameters:
value- (String): The new value of this object
-
getString
Returns the value of this object- Returns:
- (String): The value of this object as a String
-
toJSONString
Description copied from class:JSONValueSerializes the implementing class to a JSON-formatted string.- Specified by:
toJSONStringin classJSONValue- Returns:
- A JSON-formatted string representation of the object.
-