OS XでJSONやXMLファイルを整形する方法

takachan:

Mac OS XはJSONやXMLを読みやすく整形するツールがデフォルトで入っているそうだ[richardlog]。ペーストコマンド(pbpaste)を使うとコピペでも可能。 cat unformatted.json | python -m json.tool > formatted.json pbpaste | python -m json.tool > formatted.json pbpaste | xmllint —format - > formatted.xml
http://j.mp/tiIMek yebo blog

専用のコマンドがあるのかと思ったら、ただのPythonか。

(via fujimogn)

01/27/12 at 4:36am
12 notes
  1. smallfield reblogged this from fujimogn and added:
    専用のコマンドがあるのかと思ったら、ただのPythonか。
  2. fujimogn reblogged this from interglacial
  3. tag-135 reblogged this from interglacial
  4. interglacial reblogged this from do-nothing
  5. kerorokero reblogged this from do-nothing
  6. atm09td reblogged this from do-nothing and added:
    Mac OS XはJSONやXMLを読みやすく整形するツールがデフォルトで入っているそうだ[richardlog]。ペーストコマンド(pbpaste)を使うとコピペでも可能。 cat unformatted.json | python -m...
  7. do-nothing reblogged this from ysknd
  8. webcrea reblogged this from takachan
  9. ysknd reblogged this from takachan
  10. takachan posted this