1
Fork 0
mirror of https://github.com/RGBCube/JsonWrapper synced 2026-01-15 09:41:06 +00:00
JsonWrapper/docs
2022-01-28 20:18:00 +03:00
..
README.md Update README.md 2022-01-28 20:18:00 +03:00

Table of Contents

class json_wrapper.JsonWrapper(json_path: str)

Methods

def set(key: str, value, *, pathmagic: (str, list) = "")

Sets the key value pair in the json.

If the pathmagic kwarg is given, (if str)it will split it by the +'s and make dicts inside dicts(or use existing ones) until the list ends. Then it will set the key value pair in the last dict.

Args:

  • key (str): The key for the key value pair.
  • value (Any): The value for the key value pair.
  • pathmagic (Union[str, List[str]], optional): The path to follow. Defaults to "".

Example Usage TODO