System.JSON.Readers.TJsonReader.Path
Delphi
property Path: string read GetPath;
C++
__property System::UnicodeString Path = {read=GetPath};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | System.JSON.Readers.pas System.JSON.Readers.hpp |
System.JSON.Readers | TJsonReader |
Description
Gets the path of the current JSON token.
For example:
This is a JSON object called "Transaction" that contains an array of JSON objects with name/value pairs containing information about purchase records from a web site.
'{"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}'
']}'
The result of the Path property looks like this:
- "[Transaction][0].id" : JSON token path corresponding to the "id" property of the first element of the array.
- "[Transaction][1].price" : JSON token path corresponding to the "price" property of the second element of the aray.