Deze tool helpt u om alle beschikbare JSONPaths in een JSON-document te vinden, ze in een objectstructuur te bekijken, de verschillende invoerexpressies te identificeren en het overeenkomende stuk JSON-gegevens uit te pakken en te vergelijken met de invoerexpressie.
Notatie van pad
JSON of JavaScript Object Notation is een open standaard bestandsindeling die eenvoudige tekst gebruikt om gegevensobjecten op te slaan en te verzenden. Elk JSON-object heeft een inherente structuur die lijkt op een hiërarchie of boom van knooppunten, waarbij elk knooppunt een element is. JSONPath is een standaard manier waarmee we door verschillende delen van een JSON-object of JSON-bestand kunnen bladeren. Dit is handig als we een specifieke subset of specifiek element in een JSON-bestand willen.
Following are few example jsonpath expressions and results for the above sample json data
JSONPath Expression | Description | Result |
---|---|---|
$ | Select the root element | |
$.address.city | Select the value of 'city' element which is the direct children of 'address' element | |
$..type | Select the value of all the 'type' elements in the input json | |
$.address.length() | Select the length of the 'address' element | |
$..* | Select all the elements and its value | |
$.phoneNumbers[1] | Select the 2nd value from 'phoneNumbers' array | |
$.phoneNumbers[?(@.number)] | Select the 'phoneNumbers' element if it have 'number' element within it |