Sign in Join
FPDoc Onlineexperiment

TJSONEventReader class

In unit JsonReader

Event-based JSON reader that fires events for JSON elements

Declaration

pascal
TJSONEventReader = class(TBaseJSONReader)

Inheritance

  1. TJSONEventReader
  2. TBaseJSONReader
  3. TObject

Description

TJSONEventReader provides event-based JSON reading functionality. It inherits from TBaseJSONReader and fires specific events when different JSON elements are encountered during parsing. This allows applications to process JSON data using an event-driven approach similar to SAX parsing for XML. Each JSON element type has a corresponding event property that can be assigned to handle the parsed data.

Errors

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

See also

Methods

KeyValueprotected
StringValueprotected
NullValueprotected
FloatValueprotected
BooleanValueprotected
NumberValueprotected
IntegerValueprotected
Int64Valueprotected
QWordValueprotected
StartArrayprotected
StartObjectprotected
EndArrayprotected
EndObjectprotected
ExecutepublicStarts the JSON parsing process and fires events

Events

OnNullValuepublicEvent fired when a JSON null value is encountered
OnBooleanValuepublicEvent fired when a JSON boolean value is encountered
OnNumberValuepublicEvent fired when a JSON number value is encountered
OnFloatValuepublicEvent fired when a JSON floating-point value is encountered
OnIntegerValuepublicEvent fired when a JSON integer value is encountered
OnInt64ValuepublicEvent fired when a JSON 64-bit integer value is encountered
OnQWordValuepublicEvent fired when a JSON quadword value is encountered
OnStringValuepublicEvent fired when a JSON string value is encountered
OnKeyNamepublicEvent fired when a JSON object key name is encountered
OnStartObjectpublicEvent fired when a JSON object begins
OnEndObjectpublicEvent fired when a JSON object ends
OnStartArraypublicEvent fired when a JSON array begins
OnEndArraypublicEvent fired when a JSON array ends

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.