Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/HttpLibrary/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,16 @@ def log_json(self, json_string, log_level='INFO'):
for line in json.dumps(json_string, indent=2, ensure_ascii=False).split('\n'):
logger.write(line, log_level)

# debug
@_with_json
def remove_json_key(self, json_string, json_pointer):
"""
Remove the target key of the JSON document `json_string` specified by
JSON Pointer `json_pointer` to `json_value`.

Example:
| ${result}= | Remove Json Key | {"foo": {"bar": [1,2,3]}} | /foo/bar |
"""
return jsonpatch.apply_patch(json_string, [{'op': 'remove','path': json_pointer}])

def show_response_body_in_browser(self):
"""
Expand Down