Sign in Join
FPDoc Onlineexperiment

TJSONConsumerReader class

In unit JsonReader

JSON reader that uses an IJSONConsumer for processing

Declaration

pascal
TJSONConsumerReader = class(TBaseJSONReader)

Inheritance

  1. TJSONConsumerReader
  2. TBaseJSONReader
  3. TObject

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.

Errors

Inherits error handling from TBaseJSONReader. Raises EJSONParser for parsing errors.

See also

Properties

ConsumerpublicJSON consumer object that processes parsed elements

Methods

KeyValueprotected
StringValueprotected
NullValueprotected
FloatValueprotected
BooleanValueprotected
NumberValueprotected
IntegerValueprotected
Int64Valueprotected
QWordValueprotected
StartArrayprotected
StartObjectprotected
EndArrayprotected
EndObjectprotected
ExecutepublicStarts the JSON parsing process using the assigned consumer

Inherited

From TBaseJSONReader (13)

Create CurrentToken CurrentTokenString Destroy DoError DoExecute DoParse GetNextToken Options ParseArray ParseNumber ParseObject Scanner

From TObject (40)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.