snaptol.io.json_dump

Contents

snaptol.io.json_dump#

snaptol.io.json_dump(*args, **kwargs)[source]#

Serialises Python objects to a JSON formatted string with indentation.

Wraps the json.dumps method and adds a default indentation of 2 spaces as well as a fallback function for unsupported types during serialisation.

Parameters:
  • *args – Positional arguments to be passed to json.dumps.

  • **kwargs – Keyword arguments to be passed to json.dumps.

Return type:

str