Overview

Contains a JSON value identified with a name

Attribute Summary

nametypedescription
Public
arrayObject[]

holds an array value of the pair.

nameString

the name of the pair

valueObject

holds the value of the pair.

Protected

Inherited Attributes

javafx.json.JSONBase

publicnametype
doIndentBoolean

indicates whether or not indenting should be used when printing or serializing.

indentInteger

Holds the number of spaces for indenting when printing or serializing.

Function Summary

public equals(obj: Object, ) : Boolean

Determines whether this pair equals another pair

public getValueAsBoolean() : Boolean

gets the value as a Boolean

public getValueAsJSONObject() : JSONObject

gets the value as a JSONObject

public getValueAsNumber() : Number

gets the value as a Number

public getValueAsString() : String

gets the value as a String

public hashCode() : Integer

returns a hash code

public serialize(writer: Writer, curIndent: Integer, indentAmount: Integer, ) : Void

Convert the JSON Object to JSON format.

public toString() : String

gets the pair as a formatted JSON pair

Inherited Functions

javafx.json.JSONBase

public serialize(writer: Writer, ) : Void

Convert the JSON Object to JSON format.

protected abstract serialize(writer: Writer, curIndent: Integer, indentAmount: Integer, ) : Void

Convert the JSON Object to JSON format.

public toString() : String

Convert the JSON Object to JSON format.

Attributes

public array: Object[]

holds an array value of the pair. if array is not empty and then the value attribute will be set to null

public name: String

the name of the pair

public value: Object

holds the value of the pair. if value is not null then the array attribute will be emptied.

Functions

public equals(obj: Object, ):Boolean

Parameters
obj
the other pair
Returns
Boolean
true if this pair is equal to the other pair

Determines whether this pair equals another pair

public getValueAsBoolean():Boolean

Returns
Boolean
the Boolean representation of the value

gets the value as a Boolean

public getValueAsJSONObject():JSONObject

Returns
JSONObject
the JSONObject representation of the value

gets the value as a JSONObject

public getValueAsNumber():Number

Returns
Number
the Number representation of the value

gets the value as a Number

public getValueAsString():String

Returns
String
the String representation of the value

gets the value as a String

public hashCode():Integer

Returns
Integer
the hash code

returns a hash code

public serialize(writer: Writer, curIndent: Integer, indentAmount: Integer, ):Void

Parameters
writer
the java.io.Writer that will receive the formated JSON stream.
curIndent
indentAmount

Convert the JSON Object to JSON format. Output is written to the Writer.

public toString():String

Returns
String
the formatted JSON pair

gets the pair as a formatted JSON pair