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.0.dev0.tar.gz (6.4 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.0.dev0-py2.py3-none-any.whl (8.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file robotframework-jsonvalidator-1.0.0.dev0.tar.gz.

File metadata

File hashes

Hashes for robotframework-jsonvalidator-1.0.0.dev0.tar.gz
Algorithm Hash digest
SHA256 afeb5e32414f2e9737d019ce4357e774e2d053197b76628a8c342ccf1f2c14b5
MD5 696a249b588513f7678e1c38d10d10ba
BLAKE2b-256 a4c2d9ba09ab1347363e70e553d67152dc7b9d747c897c206abbf774786cb854

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_jsonvalidator-1.0.0.dev0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 04d27c3467937662382edb3a5bd04fed29b4353c69fc5255e3d0ff3da219d360
MD5 723670eae16e8d27d145163d08de9785
BLAKE2b-256 af8364faa802d2189f8ccaa25bced192e944e35c7e4002d07391f0234ce0819f

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