LoginSignup
19
17

More than 5 years have passed since last update.

sublime text > JSON整形パッケージ > PrettyJSON

Last updated at Posted at 2015-09-20
動作確認
Windows 8.1 pro(64bit)

sublime text2にてJSON整形ツールを探していた。
PrettyJSONというのがあるようだ。

参考
http://blog.morizotter.com/2014/04/02/sublime-text-package-pretty-json-is-good/

パッケージをインストール後の使い方は以下。

  1. ファイルをSublime Text2で開く
  2. Syntaxを Javascript > JSON とする
  3. Ctrl + Alt + j で整形できる

before.png

が以下になる。

after.png

複数のJSON文字列がある時、すべて選択して変換はできないようだ。
1つのJSON文字列を選択ごとに Ctrl + Alt + j で変換する。



上記整形したファイルをC++ Builder XE4で読取しようとすると、改行がついたことにより、JSONファイルの読取が失敗した。
行単位の処理としていたのが原因。

読取る前にXE4側で改行を取り除くなどの処理が必要かもしれない。

19
17
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
19
17