Simple wrapper for libraries used to query json files with different query language implementations
- jsonpath-ng.ext (extended version with e.g. filters)
- jsonpath-ng
- jmespath
Example:
*** Settings ***
Library JsonQuery jsonpath-ng.ext
*** Test Cases ***
Read and query json file
${file} Read Json File sample.json
${result} Query Json ${file} friends[?(@.id>1)] #jsonpath-ng.ext syntax
*** Settings ***
Library JsonQuery jmespath
*** Test Cases ***
Read and query json file
${file} Read Json File sample.json
${result} Query Json ${file} friends[?id>`1`] #jmespath syntax