Skip to content

otemek/robotframework-jsonquery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

robotframework-jsonquery tests PyPI version

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

Documentation