Module print

Source
Expand description

Pretty-printing JSONs with ease.

Functionsยง

print_json
Pretty-print a serializable value as JSON with a default indentation of 4 spaces. Will returns an Error if the value cannot be serialized or if the output is not valid UTF-8.
print_json_with_indent
Pretty-print a serializable value as JSON with a custom indentation. Will returns an Error if the value cannot be serialized or if the output is not valid UTF-8.