Package com.oorian.json
Class JsonString
java.lang.Object
com.oorian.json.JsonValue
com.oorian.json.JsonString
Represents a JSON string value.
JsonString wraps a Java String and provides proper JSON serialization with escape sequence handling for special characters.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Returns the underlying string value.Returns this value serialized as a JSON string.
-
Constructor Details
-
JsonString
Creates a new JsonString with the specified value.- Parameters:
value- the string value.
-
-
Method Details
-
getValue
Returns the underlying string value.- Returns:
- the string value.
-
toJsonString
Description copied from class:JsonValueReturns this value serialized as a JSON string.- Specified by:
toJsonStringin classJsonValue- Returns:
- the JSON string representation.
-