Sign in Join
FPDoc Onlineexperiment

TJSONStreamWriter class

In unit JsonWriter

JSON writer that writes directly to a stream

Declaration

pascal
TJSONStreamWriter = class(TAbstractJSONWriter)

Inheritance

  1. TJSONStreamWriter
  2. TAbstractJSONWriter
  3. TObject

Description

TJSONStreamWriter is a JSON writer implementation that writes JSON text directly to a stream without building an in-memory data structure. This writer is memory-efficient for large JSON files as it streams the output directly. It maintains element counters to properly format arrays and objects with correct comma placement.

See also

Properties

Streamprotected
StrictStringspublicControl strict JSON string encoding

Methods

PushElCountprotected
PopElCountprotected
IncElCountprotected
ElCountprotected
WriteStringprotected
createpublicCreate a new stream writer for the given stream
WriteValuepublicWrite a JSON value directly to the stream
StartPropertypublicStart writing a property in a JSON object
EndPropertypublicEnd writing a property in a JSON object
StartArraypublicStart writing a JSON array
EndArraypublicEnd writing a JSON array
NextElementpublicPrepare for the next element in a JSON array
StartObjectpublicStart writing a JSON object
EndObjectpublicEnd writing a JSON object
FlushpublicFlush any pending output to the stream

Inherited

From TAbstractJSONWriter (1)

WriteProperty

From TObject (41)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Destroy 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.