System.JSON.TJSONNull.ToBytes
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 | TJSONNull |
Description
Serializes the JSON null value into an array of bytes.
ToBytes writes four bytes containing 'n
', 'u
', 'l
', and 'l
' characters into the specified Data
byte array beginning from the Offset
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 |
Offset |
Offset from which the JSON null value is serialized into the |
Note: We recommend using EstimatedByteSize to determine the container capacity.
To serialize the JSON null value into a string, use the ToString method.