이 도구는 JSON 문서에서 사용 가능한 모든 JSONPath를 찾아 개체 트리에 표시하며, 서로 다른 입력 식을 식별하고, 입력 식에 대하여 일치하는 JSON 데이터 부분을 추출합니다.
경로 표기
JSON 또는 JavaScript 개체 표기는 간단한 텍스트를 사용하여 데이터 개체를 저장 및 전송하는 개방형 표준 파일 형식입니다. 각 JSON 개체는 각 노드가 요소가 되는 노드의 트리 또는 계층 구조와 유사한 고유의 구조를 갖습니다. JSONPath는 JSON 개체 또는 파일의 다양한 부분을 탐색할 수 있는 표준 방식입니다. JSON 파일에서 특성 하위 집합이나 요소에 도달하고자 할 때 유용합니다.
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 |