Living Systems_

Json

The unexpected convenience of JSON on the commandline

I was working with a migration from drupal to processwire CMS:es, where I wanted to be able to pipe data, including the body field with HTML formatting and all, through multiple processing steps in a flexible manner. I’d start with an extraction SQL query, through a few components to replace and massage the data, and finally over to an import command using processwire’s wireshell tool . So, basically I needed a flexible format for structured data that could be sent as one “data object” per line, to work nicely with linux commandline tools like grep, sed and awk.