Skip to content

Commit 0bd065e

Browse files
authored
Update ReadMe
1 parent 1537a47 commit 0bd065e

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,34 @@
11
# robotframework-jsonlibrary
2-
Manipulate JSON using JSONPath
2+
``JSONLibrary`` is a [Robot Framework](http://robotframework.org/) test library for manipulating [JSON](http://json.org/) Object. You can manipulate your JSON object using [JSONPath](http://goessner.net/articles/JsonPath/)
3+
4+
JSONPath is an expression which can help to access to your JSON document. The JSONPath structure is in the same way as XPath which use for accessing XML document. This is an example of JSONPath syntax.
5+
6+
| JSONPath | Description |
7+
|----------|-------------|
8+
| $ | the root object/element |
9+
| @ | the current object/element |
10+
| . or [] | child operator |
11+
| .. | recursive descent. JSONPath borrows this syntax from E4X |
12+
| * | wildcard. All objects/element regardless their names. |
13+
| [] | subscript operator. XPath uses it to iterate over element collections and for predicates. In Javascript and JSON it is the native array operator. |
14+
| [,] | Union operator in XPath results in a combination of node sets. JSONPath allows alternate names or array indices as a set. |
15+
| [start\: end\: step] | array slice operator borrowed from ES4 |
16+
| ?() | applies a filter (script) expression. |
17+
| () | script expression, using the underlying script engine. |
18+
19+
This library can help you to add, get, update and delete your JSON object. So it's very useful in case that you have a very large JSON object.
20+
21+
# Usage
22+
Install robotframework-jsonlibrary via ``pip`` command
23+
```bash
24+
pip install -U robotframework-jsonlibrary
25+
```
26+
# Example Test Case
27+
28+
*** Settings *** | |
29+
-----------------|--------------|
30+
Library | JSONLibrary |
31+
Library | Collections |
32+
33+
34+

0 commit comments

Comments
 (0)