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.

Additional Information

Installation

Install the library from PyPI using pip:

pip install robotframework-jsonvalidator

Dependencies

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.

Source Distribution

robotframework-jsonvalidator-1.0.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

robotframework_jsonvalidator-1.0.1-py2.py3-none-any.whl (8.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file robotframework-jsonvalidator-1.0.1.tar.gz.

File metadata

File hashes

Hashes for robotframework-jsonvalidator-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7d26733ded1e2f67a044d7c4f84c2c46e94404369774c08d17c0bd0aeb08d239
MD5 c98b388709b8fa9036c4bbecbfe4071e
BLAKE2b-256 fd14fe01484c9cdbd290e8e077b944ff837e9e1257134e03d51a0a6ce95dcddb

See more details on using hashes here.

File details

Details for the file robotframework_jsonvalidator-1.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for robotframework_jsonvalidator-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 094ff3e1b212148843d1866476ad037c83a1a308e9998cb9b3d86f64be92fe2c
MD5 26df1ab84084f8187ac3ba6e3abf81c8
BLAKE2b-256 031f66e769c7354463bef866d4f3a21fcf751d7eac904b0cdab769ec4ba67c81

See more details on using hashes here.

Supported by

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