Issue 5729: Allows tabs for indenting JSON output (original ) (raw )Created on 2009-04-09 17:15 by doerwalter , last changed 2022-04-11 14:56 by admin . This issue is now closed .
Files
File name
Uploaded
Description
Edit
json.diff
doerwalter,2009-04-09 17:15
Messages (9)
msg85821 - (view)
Author: Walter Dörwald (doerwalter) *
Date: 2009-04-09 17:15
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
msg109841 - (view)
Author: Mark Lawrence (BreamoreBoy) *
Date: 2010-07-10 10:22
Patch is small and simple, can we move this forward?
msg109901 - (view)
Author: Bob Ippolito (bob.ippolito) *
Date: 2010-07-10 17:43
Well this feature is already in simplejson 2.1.0, it would probably make more sense to simply merge the latest simplejson back with Python 3.
msg116109 - (view)
Author: R. David Murray (r.david.murray) *
Date: 2010-09-11 17:20
Is this merge going to happen before 3.2 beta?
msg116119 - (view)
Author: Georg Brandl (georg.brandl) *
Date: 2010-09-11 21:16
That would be nice.
msg118803 - (view)
Author: Georg Brandl (georg.brandl) *
Date: 2010-10-15 16:54
Bob, any chance you get to that merge before 3.2b1?
msg118857 - (view)
Author: Bob Ippolito (bob.ippolito) *
Date: 2010-10-16 06:35
Sorry but I don't think I will be able to. I'd be happy to accept patches into simplejson that make it easier to merge with Python 3 in the future, but I simply do not have the time to maintain the Python 3 branch of the code that we don't use.
msg120039 - (view)
Author: Raymond Hettinger (rhettinger) *
Date: 2010-10-31 08:00
Updated and applied in r86022 .
msg137208 - (view)
Author: Éric Araujo (eric.araujo) *
Date: 2011-05-29 17:31
See #11964 for a documentation problem with this change.
History
Date
User
Action
Args
2022-04-11 14:56:47
admin
set
github: 49979
2011-05-29 17:31:51
eric.araujo
set
messages: +
2010-10-31 08:00:57
rhettinger
set
status: open -> closedresolution: acceptedmessages: +
2010-10-16 22:32:30
rhettinger
set
assignee: rhettinger
2010-10-16 20:03:17
pitrou
set
assignee: bob.ippolito -> (no value)nosy: + rhettinger
2010-10-16 06:35:53
bob.ippolito
set
messages: +
2010-10-15 16:54:25
georg.brandl
set
messages: +
2010-09-11 21:30:27
eric.araujo
set
nosy: + eric.araujo
2010-09-11 21:16:37
georg.brandl
set
nosy: + georg.brandl messages: +
2010-09-11 17:20:22
r.david.murray
set
nosy: + r.david.murray messages: +
2010-07-10 17:43:08
bob.ippolito
set
messages: +
2010-07-10 10:22:03
BreamoreBoy
set
nosy: + BreamoreBoy messages: + versions: + Python 3.2, - Python 3.1, Python 2.7
2009-04-11 08:42:48
pitrou
set
versions: + Python 2.7nosy: + bob.ippolito priority: normalassignee: bob.ippolito stage: patch review
2009-04-09 17:15:29
doerwalter
create