public class

JSONString

extends JSONValue
java.lang.Object
   ↳ com.google.gwt.json.client.JSONValue
     ↳ com.google.gwt.json.client.JSONString

Class Overview

Represents a JSON string.

Summary

Public Constructors
JSONString(String value)
Creates a new JSONString from the supplied String.
Public Methods
boolean equals(Object other)
int hashCode()
JSONString isString()
Returns this, as this is a JSONString.
String stringValue()
Returns the raw Java string value of this item.
String toString()
Returns the JSON formatted value of this string, quoted for evaluating in a JavaScript interpreter.
[Expand]
Inherited Methods
From class com.google.gwt.json.client.JSONValue
From class java.lang.Object

Public Constructors

public JSONString (String value)

Creates a new JSONString from the supplied String.

Parameters
value a String value
Throws
NullPointerException if value is null

Public Methods

public boolean equals (Object other)

public int hashCode ()

public JSONString isString ()

Returns this, as this is a JSONString.

Returns
  • a reference to a JSONString if this JSONValue is a JSONString or null otherwise.

public String stringValue ()

Returns the raw Java string value of this item.

public String toString ()

Returns the JSON formatted value of this string, quoted for evaluating in a JavaScript interpreter.