Table of Contents

TJson.Deserialize Method

Overloads

TJson.Deserialize(string)

Deserializes a JSON string to a value of the specified type T.

Syntax

Unit: Bcl.Json

class function TJson.Deserialize(const Json: string): T; overload;

Parameters

<-> Parameter Type Description
const Json string The JSON string to deserialize.

Returns

The deserialized value of type T.

See also

TJson.Deserialize(TStream)

Deserializes JSON from a stream to a value of the specified type T.

Syntax

Unit: Bcl.Json

class function TJson.Deserialize(Stream: TStream): T; overload;

Parameters

<-> Parameter Type Description
Stream TStream The stream containing JSON data to deserialize.

Returns

The deserialized value of type T.

See also

TJson.Deserialize(string, TTypeToken)

Deserializes a JSON string to a TValue using a type token.

Syntax

Unit: Bcl.Json

class function TJson.Deserialize(const Json: string; const ATypeToken: TTypeToken): TValue; overload;

Parameters

<-> Parameter Type Description
const Json string The JSON string to deserialize.
const ATypeToken TTypeToken The type token that specifies the target type for deserialization.

Returns

A TValue containing the deserialized data.

See also

TJson.Deserialize(TStream, TTypeToken)

Deserializes JSON from a stream to a TValue using a type token.

Syntax

Unit: Bcl.Json

class function TJson.Deserialize(Stream: TStream; const ATypeToken: TTypeToken): TValue; overload;

Parameters

<-> Parameter Type Description
Stream TStream The stream containing JSON data to deserialize.
const ATypeToken TTypeToken The type token that specifies the target type for deserialization.

Returns

A TValue containing the deserialized data.

See also