Declaration¶
Source position: jsonreader.pp line 35
type
TBaseJSONReader = class(TObject)
public
constructor Create(Source: TStream; AUseUTF8: Boolean=True); overload;
constructor Create(const Source: RawByteString; AUseUTF8: Boolean=True); overload;
constructor Create(Source: TStream; AOptions: TJSONOptions); overload;
constructor Create(const Source: RawByteString; AOptions: TJSONOptions); overload;
constructor Create(const Source: UnicodeString; AOptions: TJSONOptions); overload;
destructor Destroy;
property Options: TJSONOptions; {rw}
end;
Inheritance¶
Description¶
TBaseJSONReader is the abstract base class for all JSON reading functionality. It provides the core parsing logic and virtual methods that must be implemented by derived classes. The class uses TJSONScanner for tokenization and handles the parsing of JSON objects, arrays, and primitive values. Derived classes must implement abstract methods to handle different JSON element types encountered during parsing.
Properties¶
| Member | Visibility | Description |
|---|---|---|
| Options | public | JSON parsing options that control reader behavior |
Methods¶
| Member | Visibility | Description |
|---|---|---|
| Create | public | Creates a new JSON reader with specified source and options |
| Destroy | public | Destroys the JSON reader and frees resources |
Errors¶
Raises EJSONParser when invalid JSON syntax is encountered.
See also¶
| Name | Description |
|---|---|
| TJSONEventReader | Event-based JSON reader that fires events for JSON elements |
| TJSONConsumerReader | JSON reader that uses an IJSONConsumer for processing |
| TJSONScanner |