Skip to content

Commit f48161e

Browse files
author
Laurent PINSON
committed
re-release 0.4
1 parent 9fe309b commit f48161e

File tree

6 files changed

+1269
-330
lines changed

6 files changed

+1269
-330
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: python
22
python:
3-
- "2.7"
43
- "3.7"
54
install: "pip install -r requirements.txt"
65
script: make clean coverage docs dist

JSONLibrary/JSONLibraryKeywords.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def convert_string_to_json(self, json_string):
179179
return json.loads(json_string)
180180

181181
@keyword("Dump JSON To File")
182-
def dump_json_to_file(self, dest_file, json_object):
182+
def dump_json_to_file(self, dest_file, json_object, encoding=None):
183183
"""Dump JSON to file
184184
185185
Arguments:
@@ -192,7 +192,7 @@ def dump_json_to_file(self, dest_file, json_object):
192192
| Dump JSON To File | ${OUTPUTID)${/}output.json | ${json} |
193193
"""
194194
json_str = self.convert_json_to_string(json_object)
195-
with open(dest_file, "w") as json_file:
195+
with open(dest_file, "w", encoding=encoding) as json_file:
196196
json_file.write(json_str)
197197
return str(dest_file)
198198

JSONLibrary/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33

4-
VERSION = "0.3.1"
4+
VERSION = "0.4"

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,19 @@ JSONPath is an expression which can help to access to your JSON document. The JS
1818

1919
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.
2020

21+
# Notes
22+
23+
Please note this library is a bridge between the Robot Framework and the parser jsonpath-ng. Hence, issues related to parsing should be raised on https://github.com/h2non/jsonpath-ng
24+
25+
Starting with version 0.4, Python2 support is dropped as Python2 reached end of life on 1st of January 2020.
26+
2127
# Usage
28+
2229
Install robotframework-jsonlibrary via ``pip`` command
2330
```bash
2431
pip install -U robotframework-jsonlibrary
2532
```
33+
2634
# Example Test Case
2735

2836
*** Settings *** | | | | |
@@ -51,6 +59,14 @@ For an example of JSONPath expressions. Go to this link:
5159

5260
https://goessner.net/articles/JsonPath/index.html#e3
5361

62+
Parser: jsonpath-ng:
63+
64+
https://github.com/h2non/jsonpath-ng
65+
66+
This github:
67+
68+
https://github.com/robotframework-thailand/robotframework-jsonlibrary
69+
5470
#Help & Issues
5571
Mention me on Twitter [@nottyo](https://twitter.com/nottyo)
5672

0 commit comments

Comments
 (0)