com.sdicons.json.model
Class JSONString
java.lang.Object
com.sdicons.json.model.JSONValue
com.sdicons.json.model.JSONSimple
com.sdicons.json.model.JSONString
public class JSONString
- extends JSONSimple
Represents a JSON delimited string.
Examples are: "Hello" and "World"
; "Hello\nWorld"
contains a newline.
Strings are always delimited with double quotes.
Methods inherited from class com.sdicons.json.model.JSONValue |
decorate, getCol, getData, getLine, getStreamName, isArray, isBoolean, isComplex, isDecimal, isInteger, isNull, isNumber, isObject, isSimple, isString, render, setData, setLineCol, setStreamName |
JSONString
public JSONString(String value)
getValue
public String getValue()
toString
public String toString()
- Overrides:
toString
in class Object
render
protected String render(boolean pretty,
String indent)
- Description copied from class:
JSONValue
- Convert the JSON value into a string representation (JSON representation).
- Specified by:
render
in class JSONValue
- Parameters:
pretty
- Indicating if the print should be made pretty (human readers) or compact (transmission or storage).indent
- Starting indent.
- Returns:
- A JSON representation.
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
strip
public Object strip()
- A pure Java object, all JSON information is removed. A JSONString
trivially maps to a Java String.
- Specified by:
strip
in class JSONValue
- Returns:
- A Java String representing the contents of a JSONString.
Copyright © 2011. All Rights Reserved.