[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'fpjson' (#fcl)

SetJSONParserHandler

Set the JSON parser handler

Declaration

Source position: fpjson.pp line 619

function SetJSONParserHandler(

  AHandler: TJSONParserHandler

):TJSONParserHandler;

Arguments

AHandler

  

The new value for the handler

Function result

Previous JSON Parser handler

Description

SetJSONParserHandler can be used to set the JSON parser handler callback. The fpJSON unit does not contain a JSON parser in itself: it contains simply the data structure and the ability to write JSON. The parsing must be done using a separate unit, and is invoked through a callback. SetJSONParserHandler must be used to set this callback.

The jsonparser unit does contain a JSON parser, and must be included once in the project to be able to parse JSON. The jsonparser unit uses the SetJSONParserHandler call to set the callback that is used by GetJSON to parse the data. This is done once at the initialization of that unit, so it is sufficient to include the unit in the uses clause of the program.

The function returns the previously registered callback.

See also

GetJSONParserHandler

  

Get the current JSON parser handler

TJSONParserHandler

  

Callback to parse JSON into JSONData

GetJSON

  

Convert JSON string to JSON data structure


Documentation generated on: Sep 28 2017