Declaration¶
Source position: jsonreader.pp line 154
type
TJSONConsumerReader = class(TBaseJSONReader)
public
procedure Execute;
property Consumer: IJSONConsumer; {rw}
end;
Inheritance¶
Description¶
TJSONConsumerReader provides JSON reading functionality using the IJSONConsumer interface. It inherits from TBaseJSONReader and delegates JSON element processing to an assigned consumer object. This approach allows for flexible JSON processing by implementing the IJSONConsumer interface rather than creating event handlers. The consumer pattern provides an alternative to the event-driven approach used by TJSONEventReader.
Properties¶
| Member | Visibility | Description |
|---|---|---|
| Consumer | public | JSON consumer object that processes parsed elements |
Methods¶
| Member | Visibility | Description |
|---|---|---|
| Execute | public | Starts the JSON parsing process using the assigned consumer |
Errors¶
Inherits error handling from TBaseJSONReader. Raises EJSONParser for parsing errors.
See also¶
| Name | Description |
|---|---|
| TBaseJSONReader | Abstract base class for JSON readers |
| IJSONConsumer | Interface for JSON data consumers |
| TJSONEventReader | Event-based JSON reader that fires events for JSON elements |