Class JSONString

public class JSONString
extends JSONValue
Represents a JSON string.

Constructors

JSONString(String)Creates a new JSONString from the supplied String.

Methods

isString()Returns this, as this is a JSONString.
stringValue()Returns the raw Java string value of this item.
toString()Returns the JSON formatted value of this string, quoted for evaluating in a JavaScript interpreter.

Constructor Detail

JSONString

public JSONString(String value)
Creates a new JSONString from the supplied String.

Parameters

value
a String value

Method Detail

isString

public JSONString isString()
Returns this, as this is a JSONString.

stringValue

public String stringValue()
Returns the raw Java string value of this item.

toString

public String toString()
Returns the JSON formatted value of this string, quoted for evaluating in a JavaScript interpreter.