Registry / testing / robotframework-jsonlibrary

robotframework-jsonlibrary

JSON →
library0.5pypypi✓ verified 24d ago

robotframework-jsonlibrary is a Robot Framework test library designed for manipulating JSON objects within test automation scripts. It leverages JSONPath expressions for efficient querying, adding, updating, and deleting data within JSON structures. The current version is 0.5, with releases occurring sporadically, indicating active maintenance.

pip install -U robotframework-jsonlibrary
INSTALL
IMPORT
SIG · ROBOTFRAMEWORK-JSO
R
robotframework-jsonlibrary
testingpythonv0.5
Install
3.8s avg
Import
Disk
28MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 29.6MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.8s · import 0.000s · 30MB
28MB installed
● package 28MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

JSONLibrary
*** Settings *** Library JSONLibrary
Imported in Robot Framework's *** Settings *** section.

This Robot Framework example demonstrates basic JSON manipulation. It creates a JSON object (as a Robot Framework dictionary), adds a new field using `Add Object To Json`, retrieves a value with `Get Value From Json`, and updates an existing field using `Update Value To Json`. The `Should Be Equal As Strings` keyword is used for assertions. This code is designed to be placed in a `.robot` file.

resource.robot *** Settings *** Library JSONLibrary *** Test Cases *** Example JSON Manipulation ${json_obj}= Create Dictionary name=Alice age=30 city=New York Log Initial JSON: ${json_obj} # Add a new field ${updated_json}= Add Object To Json ${json_obj} $.email alice@example.com Log JSON after adding email: ${updated_json} # Get a value ${name}= Get Value From Json ${updated_json} $.name Should Be Equal As Strings ${name} Alice Log Name retrieved: ${name} # Update a value ${final_json}= Update Value To Json ${updated_json} $.age 31 Log JSON after updating age: ${final_json} # Verify update ${updated_age}= Get Value From Json ${final_json} $.age Should Be Equal As Strings ${updated_age} 31
Debug
Known issues
breakingPython 2 support was dropped starting with version 0.4. Users on Python 2 must either upgrade their Python environment or use an older version of the library (pre-0.4).
fix
Upgrade to Python 3.x.
affects: >=0.4
breakingPrior to version 0.5, some keywords that modified JSON objects (e.g., `Add Object To Json`) would modify the object in-place. As of version 0.5, these keywords now consistently return the modified JSON object, requiring users to capture the return value.
fix
Ensure test cases capture the return value of modifying keywords, e.g., `${json_obj}=    Add Object To Json    ${json_obj}    ...`
affects: <0.5
gotchaThis library acts as a bridge to the `jsonpath-ng` parser. Any issues encountered with JSONPath parsing behavior should be reported directly to the `jsonpath-ng` repository, not `robotframework-jsonlibrary`.
fix
Consult `jsonpath-ng` documentation and issue tracker for parsing-specific problems.
affects: *
gotchaThe underlying `jsonpath-ng` library has a dependency `ply`, which has been flagged with high-severity vulnerabilities (e.g., 9.8). Users should be aware of this transitive dependency risk.
fix
Monitor `jsonpath-ng` and `ply` for security updates, or consider vendoring `ply` with security patches if a fix is not available upstream.
affects: *
Upgrade
Version history
0.5latest on PyPI · released Aug 8, 2022
Audit
Dependencies
robotframeworkrequiredCore framework for the library.
jsonpath-ngrequiredUnderlying parser for JSONPath expressions.
jsonschemaoptionalUsed for JSON schema validation keywords.
Agent activity
13 hits · last 30 days
node
10
OpenAI (training)
1
Resources
robotframework-jsonlibrary — pip install robotframework-jsonlibrary · libregistry