Skip to content

CircuitPython json.dumps support for JSON Pretty-Print output #1994

@yesnoio

Description

@yesnoio

Hoping to propose a small revision to CircuitPython's json.dumps so it supports pretty-printing of JSON strings. It seems ujson.dumps supports two additional formatting arguments: json.dumps(parsed, indent=4, sort_keys=True) (https://stackoverflow.com/a/12944035/6763539).
Some may want this pretty-print functionality, while others may find it unnecessary. Given how Python supports import of specific module functions, perhaps there should be json.dump & a json.dumps where json.dumps is status-quo & json.dump prints JSON in a pretty format?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions