TJSONValue

constructor Parse(const aString: string)

Creates a JSON value from a JSON string

procedure Free

Releases memory taken by the JSON value

function Value: string

Returns a string representation of the JSON value

[Path: string]: TJSONValue

Returns a JSON Value accessed by the specified path. Returns nil if the path does not exist

function IsString: boolean

Checks if the value is a string

function AsString: String

Casts the value to a string

function IsInt: boolean

Checks if the value is an integer

function AsInt: integer

Casts the value to an integer

function IsInt64: boolean

Checks if the value is Int64

function AsInt64: int64

Casts the value to Int64

function IsNumber: boolean

Checks if the value is a double

function AsNumber: double

Casts the value to a double

function IsBoolean: boolean

Checks if the value is a boolean

function AsBoolean: boolean

Casts the value to a boolean

function IsObject: boolean

Checks if the value is a TJSONObject entity

function AsObject: TJSONObject

Casts the value to a TJSONObject entity

function IsArray: boolean

Checks if the value is a TJSONArray entity

function AsArray: TJSONArray

Casts the value to a TJSONArray entity

function ToJSON: string

Serializes the JSON value to a JSON string

function Clone: TJSONValue

Returns a deep copy of the JSON entity

TJSONObject

constructor Create

Creates an empty JSON object

function Remove(const aKey: string): TJSONValue

Removes a pair from the JSON object by its key and returns the removed value as a TJSONValue

function Count: integer

Returns the number of pairs in the JSON object

Keys[Index: integer]: string

Returns the key of the pair by the specified index

Values[Index: integer]: TJSONValue

Returns the value as TJSONValue of the pair by the specified index

 TJSONArray

constructor Create

Creates an empty JSON array

procedure Add(const aValue: TJSONValue)

Adds a TJSONValue item into the array

function Remove(const aIndex: integer): TJSONValue

Removes a pair from the JSON array by its index and returns the removed item as a TJSONValue

function Count: integer

Returns the number of items in the array

[Index: integer]: TJSONValue

Returns the item as a TJSONValue specified by index of the array