toolrack.json_util
Utilities for dealing with JSON data.
- toolrack.json_util.indent(in_fd, out_fd, indent=4, ensure_ascii=False)
Indent JSON data.
It reads text in JSON format from
in_fd
and writes the formatted output toout_fd
, using the specified amount ofindent
spaces.- Parameters:
in_fd – input file descriptor.
out_fd – output file descriptor.
indent (int) – number of spaces used for indentation.
ensure_ascii (bool) – passed to the JSON serializer, if specified, non-ASCII characters are escaped.