System.JSON.Builders.TJSONIterator.DoRewindReader

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure DoRewindReader(AReader: TJsonReader); virtual;

C++

virtual void __fastcall DoRewindReader(System::Json::Readers::TJsonReader* AReader);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
System.JSON.Builders.pas
System.JSON.Builders.hpp
System.JSON.Builders TJSONIterator

Description

Rewinds the data stream of the specified JSON reader.

Rewind and (indirectly) Find rely on this method to rewind the data stream of the source JSON reader.

The default implementation of DoRewindReader uses the rewinding procedure passed to the constructor of the iterator. If you do not pass a rewinding procedure to the constructor, it raises an exception.

You can override this method in subclasses to implement your own logic to rewind the data stream of the JSON reader. If you do, take into account that TJsonReader.Rewind only resets the state of the JSON reader; your implementation of DoRewindReader does not need to do this, your implementation must rewind the underlying data stream instead.