From 96bb1fce8ec4f97cd2221c33025450c3625fc36a Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Tue, 2 Jul 2024 16:32:44 +0200 Subject: [PATCH] feat: added documentation --- README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 69ce3e2..a48fd67 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,22 @@ # Json-Unescape -Unescape json string, which is escaped for json. This is usually necessarry for webscraping. \ No newline at end of file +Unescape json string, which is escaped for json. This is usually necessarry for webscraping. + +## Installation + +```bash +pip install json-unescape +``` + +## Usage + +```python +>>> from json_unescape import escape_json, unescape_json + +>>> escape_json('{"foo": "bar,,,eee"}') +'{"key": "{\\"foo\\": \\"bar,,,eee\\"}"}' + +>>> unescape_json(escape_json('{"key": "{\\"foo\\": \\"bar,,,eee\\"}"}')) +'{"foo": "bar,,,eee"}' +``` +