Quantcast
Viewing latest article 4
Browse Latest Browse All 7

コンソールから整形されたJSONを表示

Linuxから手軽にJSON文字列を整形してコンソールに出力してくれるコマンドがあったのでご紹介。

echo '{"json":"obj"}' | python -mjson.tool

echoの部分は、catでやればjsonファイルをそのまま読み込むこともできます。

参考: http://docs.python.jp/2.6/library/json.html


Viewing latest article 4
Browse Latest Browse All 7

Trending Articles