Class JsonString

java.lang.Object
com.oorian.json.JsonValue
com.oorian.json.JsonString

public class JsonString extends JsonValue
Represents a JSON string value.

JsonString wraps a Java String and provides proper JSON serialization with escape sequence handling for special characters.

  • Constructor Details

    • JsonString

      public JsonString(String value)
      Creates a new JsonString with the specified value.
      Parameters:
      value - the string value.
  • Method Details

    • getValue

      public String getValue()
      Returns the underlying string value.
      Returns:
      the string value.
    • toJsonString

      public String toJsonString()
      Description copied from class: JsonValue
      Returns this value serialized as a JSON string.
      Specified by:
      toJsonString in class JsonValue
      Returns:
      the JSON string representation.