System.JSON.TJSONArray.ToBytes

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function ToBytes(const Data: TArray<Byte>; Offset: Integer): Integer; override;

C++

virtual int __fastcall ToBytes(const System::DynamicArray<System::Byte> Data, int Offset);

Properties

Type Visibility Source Unit Parent
function public
System.JSON.pas
System.JSON.hpp
System.JSON TJSONArray

Description

Serializes the current JSON array content into an array of bytes.

ToBytes writes a byte representation of the current JSON array content into the specified Data byte array beginning from the Pos element. ToBytes returns the actual size of the Data array. ToBytes assumes that the byte container has sufficient capacity.

The parameters are described in the table below.

Parameter Meaning

Data

Byte container.

Pos

Offset from which the JSON array content is serialized into the Data array.

Note: We recommend using EstimatedByteSize to determine the container capacity.

To serialize the JSON array into a string, use the ToString method.

See Also