247
144

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Visual Studio Code】JSONを整形する方法

Last updated at Posted at 2020-04-21

#はじめに
JSONをパッと見やすく整形したい時ってありますよね。それ...
###『Visual Studio Code』で簡単にできますよ

#やり方

  1. 新しいファイル作成(Mac:cmdn または タブのところを2回クリック)
  2. 1行のJSONを貼り付け
  3. 言語モードをJSONにする(Mac:cmdk押した後m
  4. 右クリックで『ドキュメントのフォーマット』を選択(Mac:optionshiftL)

〜整形前〜
JSON整形前.png

〜整形後〜
JSON整形後.png

ズキュゥゥゥン

##ちなみに
スペースを取り除く
^[ \t]+

改行を取り除く
[\r\n]+

こちらで元の状態に戻せます。

247
144
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
247
144

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?