Skip to main content

A Robot Framework JSON Validator Library

Project description

Build Status

Short Description

Robot Framework library for JSON validation based on JSONSchema, JSONPath, JSONSelect.

Installation

Install the library from PyPI using pip:

pip install robotframework-jsonvalidator

Documentation

See keyword documentation for JsonValidator library on GitHub.

Example

json_example.json

{
  "store": {
    "book": [
      {
        "category": "reference",
        "author": "Nigel Rees",
        "title": "Sayings of the Century",
        "price": 8.95
      },
      {
        "category": "fiction",
        "author": "Evelyn Waugh",
        "title": "Sword of Honour",
        "price": 12.99
      },
      {
        "category": "fiction",
        "author": "Herman Melville",
        "title": "Moby Dick",
        "isbn": "0-553-21311-3",
        "price": 8.99
      },
      {
        "category": "fiction",
        "author": "J. R. R. Tolkien",
        "title": "The Lord of the Rings",
        "isbn": "0-395-19395-8",
        "price": 22.99
      }
    ],
    "bicycle": {
      "color": "red",
      "price": 19.95
    }
  }
}

Robot Framework test case:

*** Settings ***
Library    JsonValidator
Library    OperatingSystem

*** Test Cases ***
Check Element
    ${json_example}=    OperatingSystem.Get File   ${CURDIR}${/}json_example.json
    Element should exist    ${json_example}    .author:contains("Evelyn Waugh")

License

Apache License 2.0

Project details


Download files

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

Files for robotframework-jsonvalidator, version 2.0.0
Filename, size File type Python version Upload date Hashes
Filename, size robotframework_jsonvalidator-2.0.0-py2.py3-none-any.whl (10.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size robotframework-jsonvalidator-2.0.0.tar.gz (6.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page