Skip to main content

Robot Framework library for parsing json files

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotframework_jsonquery-1.0.3.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

robotframework_jsonquery-1.0.3-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page