System.JSON.TJSONArrayEnumerator

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

System.TObjectTJSONArrayEnumerator

Delphi

TJSONArrayEnumerator = class

C++

class PASCALIMPLEMENTATION TJSONArrayEnumerator : public System::TObject

プロパティ

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


説明

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

イテレータを使用して TJSONArray オブジェクトを反復処理するには、JSON 配列オブジェクトの GetEnumerator を呼び出して TJSONArrayEnumerator イテレータを作成し、次のように、MoveNextCurrent を使用して JSON 配列の JSON 値を反復処理します。

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

関連項目