System.JSON.TJSONArray.TEnumerator
Delphi
TEnumerator = class
C++
class PASCALIMPLEMENTATION TEnumerator : public System::TObject
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
class | public | System.JSON.pas System.JSON.hpp |
System.JSON | TJSONArray |
説明
TJSONArray オブジェクトを走査するためにイテレータを使用するためには、JSON 配列 オブジェクトから GetEnumerator を呼び出して、TEnumerator イテレータを作成し、MoveNext と Current を使用して、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;
// …
}