Json Parse Format
This documentation illustrates how to parse the JSON path.
Type 1 JSON Objects
JSON objects are wrapped in curly braces. Inside the object, we can list any number of key-value pairs, separated by commas:
Parse:
Want to parse the name: root.firstName
Want to parse the age: root.age
Want to parse the full response: root
Type 2 JSON Arrays
JSON arrays are wrapped in square brackets. Inside an array, we can declare any number of objects, separated by commas:
Parse:
Want to parse the name: root[*].name
Want to parse the age: root[*].age
Want to parse the full response: root
Type 3 Nesting Objects & Arrays
JSON can store nested objects and arrays as values assigned to keys. It is very helpful for storing different sets of data in one file:
Parse:
Want to parse the name: root[*].name
Want to parse the age: root[*].age
Want to parse the city: root.address
.city
Want to parse the Java
: root.languages
.[0]
Want to parse the link
: root.socialProfiles
[*].link
Want to parse the full response: root
Note: * means the array index.
Last updated