feat: implemented functions

This commit is contained in:
2024-07-02 16:30:25 +02:00
parent 4f252a83cc
commit adef56790f
3 changed files with 10 additions and 8 deletions

View File

@@ -0,0 +1,10 @@
import json
def escape_json(json_str: str) -> str:
nested_object: dict = {"key": json_str}
return json.dumps(nested_object)
def unescape_json(json_str: str) -> str:
nested_json_string: str = '{"key": ' + json_str + '}'
return json.loads(nested_json_string)["key"]

View File

@@ -1,5 +0,0 @@
from .__about__ import __name__, __version__
def cli():
print(f"Running {__name__} version {__version__} from __main__.py")