Table of Contents

TJson.SerializeAs Method

Overloads

TJson.SerializeAs(T)

Serializes a typed value to a JSON string.

Syntax

Unit: Bcl.Json

class function TJson.SerializeAs(const Value: T): string; overload;

Parameters

<-> Parameter Type Description
const Value T The value of type T to serialize.

Returns

A JSON string representation of the value.

See also

TJson.SerializeAs(T, TStream)

Serializes a typed value and writes the JSON output to a stream.

Syntax

Unit: Bcl.Json

class procedure TJson.SerializeAs(const Value: T; Stream: TStream); overload;

Parameters

<-> Parameter Type Description
const Value T The value of type T to serialize.
Stream TStream The stream to write the JSON output to.

See also