Tessa Alexander's notes

on web development.

  • Twitter
  • Github
  • LinkedIn
  • About
  • Archive

Hello JSON formatting at my fingertips

February 19, 2020 Tips

Occasionally I need to reformat a JSON file but didn’t have a goto command tool at my disposal.  Surprise surprise old friend Python comes along ;)

$ echo '{"love": "everyone", "hate": "no one"}' | python -m json.tool
{
    "hate": "no one",
    "love": "everyone"
}

ref https://docs.python.org/3.6/library/json.html#module-json.tool

 

json, python

Post navigation

« Decentralising machine learning rule makers
Go workshop »

Categories

  • Android
  • Conferences
  • Sessions
  • Talks
  • Tips
  • Training
  • Workshops

Links

  • Meetup
  • Padlets
  • Research IT, University of Bristol
  • Web/tech related bookmarks

Tags

2018 ajax cloud dbpedia dev8D dexy django djangocon docker dockercon dockercon2020 email europython FOSDEM git google HPC IMAP ipython k-9 kss learning linux machine machine learning mobile mollyproject monitoring mymobilebristol notebook open source pandas PyConUK pyconuk2018 pylons python R RepRap RSS software twapper twitter Yahoo pipes zodb Zope
Powered by WordPress and Smartline.