System.JSON.Builders.TJSONIterator.Next

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Next(const AKey: String = ''): Boolean;

C++

bool __fastcall Next(const System::UnicodeString AKey = System::UnicodeString());

Properties

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

Description

Moves the iterator to the next JSON item of the current array or object.

The first call to Next, without providing AKey, moves the iterator to the first JSON item of the input data. Successive calls move the iterator to the next JSON items of the current JSON level. Next returns False if there are no more items where the iterator can move to; or True if the input data contains more items.

You may specify AKey, either an array index number or an object key name, to forward the iterator to such key. When the provided key is found, Next returns True and moves the iterator to that key. Next returns False when the key was not found, and forwards the iterator to the last item of the current array or object.

Next does not:

  • Enter an array or object item; use Recurse for this purpose.
  • Return to the parent array; use Return for this purpose.

See Also