Class JSONNumber

public class JSONNumber
extends JSONValue
Represents a JSON number. Numbers are represented by doubles.

Constructors

JSONNumber(double)Creates a new JSONNumber from the double value.

Methods

getValue()Gets the double value that this JSONNumber represents.
isNumber()Returns this, as this is a JSONNumber.
toString()Returns the JSON representation of this number.

Constructor Detail

JSONNumber

public JSONNumber(double value)
Creates a new JSONNumber from the double value.

Parameters

value

Method Detail

getValue

public double getValue()
Gets the double value that this JSONNumber represents.

isNumber

public JSONNumber isNumber()
Returns this, as this is a JSONNumber.

toString

public String toString()
Returns the JSON representation of this number.