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

Pretty Print #4

Open
sabman opened this issue Jan 14, 2010 · 2 comments
Open

Pretty Print #4

sabman opened this issue Jan 14, 2010 · 2 comments

Comments

@sabman
Copy link

sabman commented Jan 14, 2010

Is there a way to pretty print the JSON output?

@phorsfall
Copy link

I'm not sure if this is exactly what you mean, but the JSON Ruby Gem is bundled with a shell script to prettify JSON:

sudo gem install json
echo '{ "foo": "bar" }' | prettify_json.rb

@sabman
Copy link
Author

sabman commented Feb 8, 2010

ah that's cool - thanks that's helpful too - except I wanted to push pretty json from the server - or would the newlines make JSON invalid?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants