Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools MailChimp API MailChimp API Adding New Members to Your List

Zakaria Desai
Zakaria Desai
2,218 Points

Json On Windows

First off, take it easy if this has been answered before. I tried the obvious Dr Google, but cannot seem to get "Json" on windows enabled.

I am not even sure what exactly it does, just trying to follow along with this Mailchimp API tutorial, and I do have cURL running, but then Nate pipes the cURL request into Json, which is not working out on my PC.

Thanks! Zak

2 Answers

Hey Zakaria --

Sorry for any confusion that caused. That was just an extra command I used to get the curl response to display in an orderly way for the videos. Curl will function if you omit the "| json" portion of the request.

That json command I used was an alias for a python tool that reorganizes JSON into a more human-readable format. I've never used it on a Windows machine, but I imagine it should work the same. You can substitute "python -m json.tool" for "json" and get the pretty version of the output.

Again, sorry for any confusion!

Zakaria Desai
Zakaria Desai
2,218 Points

Nate - thanks for clearing this up! Yes it did work on my windows cmd terminal, after installing cURL, but did not display as orderly as yours did on screen. I will give the "alias" a shot as Tony has recommended below as well.

Thank you for responding!

Zakaria Desai Here's a tutorial on making a shortcut form the terminal (I also have Mac, so might have to do the Windows version).

http://coolestguidesontheplanet.com/make-an-alias-in-bash-shell-in-os-x-terminal/

You'll want to create an alias that command json='python -m json.tool'