Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSON viewer plugin for android studio?

Please help me to find a JSON viewer plugin for android studio like Eclipse JSON Editor plugin.

I tried both JSONFormatter & JSON online viewer, but not working like Eclipse JSON Editor Plugin.

like image 230
khaleel_jageer Avatar asked Jul 03 '15 05:07

khaleel_jageer


4 Answers

  1. Ctrl + Alt + Shift + Ins -> Choose JSon.
  2. Paste JSON
  3. Ctrl + Alt + Shift + R
like image 88
Sagar Balyan Avatar answered Oct 05 '22 11:10

Sagar Balyan


For all the InelliJ IDE's you can install this plugin.

Steps to install the plugin in Android Studio on Mac

  1. Click on Android Studio from top left corner
  2. Click on Preference
  3. Click on Plugins
  4. Click on Browse repositories from bottom bar
  5. From top search bar search JSON Viewer
  6. Click on install and restart the Android Studio
  7. Size of the plugin is just 127.2KB

How it use in Android Studio

enter image description here

It looks something like this enter image description here

like image 33
Suresh Maidaragi Avatar answered Oct 05 '22 11:10

Suresh Maidaragi


1) Open a new scratch buffer (Ctrl + Shift + A and enter "scratch buffer").

2) Paste your json into the scratch buffer

3) Change the file language to Json (Ctrl + Shift + A and enter "change file language")

4) Reformat Code (Ctrl + Alt + L)

like image 31
Lukas Lechner Avatar answered Oct 05 '22 10:10

Lukas Lechner


I found the solution by creating a file with an extension of .json inside your project. Then paste the unaligned json content in this file, then press align keys(Keys combination may vary based on your Android studio Keymap. For me Ctrl + Alt + L). That's all json data is aligned with indents.

like image 25
khaleel_jageer Avatar answered Oct 05 '22 11:10

khaleel_jageer