A Robot Framework JSON Validator Library
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for robotframework-jsonvalidator-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d26733ded1e2f67a044d7c4f84c2c46e94404369774c08d17c0bd0aeb08d239 |
|
MD5 | c98b388709b8fa9036c4bbecbfe4071e |
|
BLAKE2b-256 | fd14fe01484c9cdbd290e8e077b944ff837e9e1257134e03d51a0a6ce95dcddb |
Close
Hashes for robotframework_jsonvalidator-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 094ff3e1b212148843d1866476ad037c83a1a308e9998cb9b3d86f64be92fe2c |
|
MD5 | 26df1ab84084f8187ac3ba6e3abf81c8 |
|
BLAKE2b-256 | 031f66e769c7354463bef866d4f3a21fcf751d7eac904b0cdab769ec4ba67c81 |