[New-bugs-announce] [issue5729] Allows tabs for indenting JSON output

Walter Dörwald <report@bugs.python.org> at psf.upfronthosting.co.za Walter Dörwald <report@bugs.python.org> at psf.upfronthosting.co.za
Thu Apr 9 19:15:30 CEST 2009


New submission from Walter Dörwald <walter at livinglogic.de>:

This patchs makes it possible to use tabs for indenting the output of
json.dumps(). With this patch the indent argument can now be either an
integer specifying the number of spaces per indent level or a string
specifying the indent string directly::

   json.dumps(list(range(10), indent=3) # three spaces per indent
   json.dumps(list(range(10), indent="\t") # one tab per indent

----------
components: Library (Lib)
files: json.diff
keywords: patch
messages: 85821
nosy: doerwalter
severity: normal
status: open
title: Allows tabs for indenting JSON output
type: feature request
versions: Python 3.1
Added file: http://bugs.python.org/file13664/json.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5729>
_______________________________________


More information about the New-bugs-announce mailing list