System.JSON.Readers.TJsonReader.ReadAsBytes
Delphi
function ReadAsBytes: TBytes; virtual;
C++
virtual System::DynamicArray<System::Byte> __fastcall ReadAsBytes();
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.JSON.Readers.pas System.JSON.Readers.hpp |
System.JSON.Readers | TJsonReader |
Description
Reads the next JSON token or tokens, and interprets it as binary data.
Instead of Read, you may alternatively use a different reading method if you can anticipate the type of the next token.
ReadAsBytes function reads the next token and returns a TBytes value. ReadAsBytes calls ReadAsBytesInternal.
When the next token is an array, the function tries to interpret all the content from the array as a list of bytes.
If the token cannot be interpreted to the expected type, an exception raises that provides the path to the token, the number of the line and the position within that line.