Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON Pretty printing #661

Closed
gopherbot opened this issue Mar 12, 2010 · 4 comments
Closed

JSON Pretty printing #661

gopherbot opened this issue Mar 12, 2010 · 4 comments

Comments

@gopherbot
Copy link
Contributor

by kees.varekamp:

Would be nice if json.Marshal adds optional pretty printing (adding 
newlines and indents for more human readable output). Could be done by 
adding integer argument n where n <= 0 means 'no indents and newlines', n > 
0 means 'newlines and n spaces as indent' (as in Python). See also 
http://groups.google.com/group/golang-
nuts/browse_thread/thread/56a04181ecd5be3d
@adg
Copy link
Contributor

adg commented Mar 16, 2010

Comment 1:

Status changed to Accepted.

@adg
Copy link
Contributor

adg commented Mar 16, 2010

Comment 2:

Owner changed to a...@golang.org.

@adg
Copy link
Contributor

adg commented Mar 16, 2010

Comment 3:

Status changed to Fixed.

@gopherbot
Copy link
Contributor Author

Comment 4 by my.name.is.aaron.newell:

Anyone looking for this, json.MarshalIndent() gives decent enough pretty print
functionality

@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc unassigned adg Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants