TJSONParserHandler procedure type
Callback to parse JSON into
JSONData.
Declaration
TJSONParserHandler = procedure(AStream: TStream;
const AUseUTF8: Boolean;
out Data: TJSONData)Arguments
AStream | Stream to parse. |
AUseUTF8 | Use UTF-8 in returned ansistrings. |
Data | Resulting JSON data. |
Description
TJSONParserHandler is a callback prototype used by the
GetJSON
function to do the actual parsing. It has 2 arguments:
AStream,
which is the stream containing the JSON that must be parsed, and
AUseUTF8, which indicates whether the (ansi) strings contain UTF-8.
The result should be returned in Data.
The parser is expected to use the JSON class types registered using the SetJSONInstanceType method, the actual types can be retrieved with GetJSONInstanceType
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
