System.JSON.Readers.TJsonReader.Depth
Delphi
property Depth: Integer read GetDepth;
C++
__property int Depth = {read=GetDepth, nodefault};
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
property | public | System.JSON.Readers.pas System.JSON.Readers.hpp |
System.JSON.Readers | TJsonReader |
説明
JSON ドキュメントにおける現在のトークンの深度を取得します。
Depth は、現在のトークンの入れ子レベルを表す、整数を返します。
例:
'{"Transaction":['
'{"id":662713, "firstName":"John", "lastName":"Doe", "price": 2.1, "parent_id": null, validated:true},'
'{"id":662714, "firstName":"Anna", "lastName":"Smith", "price": 4.5, "parent_id": null, validated: false},'
'{"id":662715, "firstName":"Peter", "lastName":"Jones", "price": 3.6, "parent_id": null, validated: true}'
']}'
- (StartObject)
{
- Depth = 0 - 最初の「名前/値」ペア
"Transaction":[
- Depth = 1 - (StartObject)
{
- Depth = 2 - 配列からのオブジェクト内部の「名前/値」ペア - Depth = 3