System.JSON.TJSONArray.TEnumerator

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

TEnumerator = class

C++

class PASCALIMPLEMENTATION TEnumerator : public System::TObject

プロパティ

種類 可視性 ソース ユニット
class public
System.JSON.pas
System.JSON.hpp
System.JSON TJSONArray


説明

JSON 配列項目群のイテレータです。

TJSONArray オブジェクトを走査するためにイテレータを使用するためには、JSON 配列 オブジェクトから GetEnumerator を呼び出して、TEnumerator イテレータを作成し、MoveNextCurrent を使用して、JSON 配列の JSON 値を走査していきます。

Delphi:
MyJSONArrayIterator := TEnumerator.Create(MyJSONArray);
while MyJSONArrayIterator.MoveNext do
begin
    MyJSONValue := MyJSONArrayIterator.Current;
    // …
end;
C++:
TEnumerator* MyJSONArrayIterator = new TEnumerator(MyJSONArray);
while (MyJSONArrayIterator->MoveNext())
{
    TJSONValue* MyJSONValue = MyJSONArrayIterator->Current;
    // …
}

関連項目