Skip to content

Methods Summary ​

TJSONValue ​

constructor Parse(const aString: string)Creates a JSON value from a JSON string
procedure FreeReleases memory taken by the JSON value
function Value: stringReturns a string representation of the JSON value
[Path: string]: TJSONValueReturns a JSON Value accessed by the specified path. Returns nil if the path does not exist
function IsString: booleanChecks if the value is a string
function AsString: StringCasts the value to a string
function IsInt: booleanChecks if the value is an integer
function AsInt: integerCasts the value to an integer
function IsInt64: booleanChecks if the value is Int64
function AsInt64: int64Casts the value to Int64
function IsNumber: booleanChecks if the value is a double
function AsNumber: doubleCasts the value to a double
function IsBoolean: booleanChecks if the value is a boolean
function AsBoolean: booleanCasts the value to a boolean
function IsObject: booleanChecks if the value is a TJSONObject entity
function AsObject: TJSONObjectCasts the value to a TJSONObject entity
function IsArray: booleanChecks if the value is a TJSONArray entity
function AsArray: TJSONArrayCasts the value to a TJSONArray entity
function ToJSON: stringSerializes the JSON value to a JSON string
function Clone: TJSONValueReturns a deep copy of the JSON entity

TJSONObject ​

constructor CreateCreates an empty JSON object
function Remove(const aKey: string): TJSONValueRemoves a pair from the JSON object by its key and returns the removed value as a TJSONValue
function Count: integerReturns the number of pairs in the JSON object
Keys[Index: integer]: stringReturns the key of the pair by the specified index
Values[Index: integer]: TJSONValueReturns the value as TJSONValue of the pair by the specified index

TJSONArray ​

constructor CreateCreates an empty JSON array
procedure Add(const aValue: TJSONValue)Adds a TJSONValue item into the array
function Remove(const aIndex: integer): TJSONValueRemoves a pair from the JSON array by its index and returns the removed item as a TJSONValue
function Count: integerReturns the number of items in the array
[Index: integer]: TJSONValueReturns the item as a TJSONValue specified by index of the array