System.JSON.TJSONNumber.ToBytes
Delphi
function ToBytes(const Data: TArray<Byte>; const Idx: Integer): Integer; override;
C++
virtual int __fastcall ToBytes(const System::DynamicArray<System::Byte> Data, const int Idx);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.JSON.pas System.JSON.hpp |
System.JSON | TJSONNumber |
Description
Serializes the current JSON number into an array of bytes.
ToBytes writes a byte representation of the current JSON number into the specified Data
byte array beginning from the Idx
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 |
Idx |
Offset from which the JSON number is serialized into the |
Note: We recommend using EstimatedByteSize to determine the container capacity.
To serialize the JSON number into a string, use the ToString method.