YourAverageTechBro / DevToolboxWeb

https://devtoolbox-rho.vercel.app
MIT License
577 stars 71 forks source link

Enhancement: JSON Viewer with a collapsible JSON Object view | Enhanced JSON Viewer #62

Open shubhamwaghe opened 3 months ago

shubhamwaghe commented 3 months ago

We often require to paste, reformat and inspect the structural aspects of a big JSON object. This requires JSON object to be collapsed. Example here in below example - I would want to collapse 2nd and 3rd book object in array to have a look at book , bicycle and expensive to be on the same level.

Integrating an open-source JSON view component in the view can a clean approach that can adopted using exiting opensource plugins

{
  "store": {
    "book": [
      {
        "category": "reference",
        "author": "Nigel Rees",
        "title": "Sayings of the Century",
        "price": 8.95
      },
      {
        "category": "fiction",
        "author": "Evelyn Waugh",
        "title": "Sword of Honour",
        "price": 12.99
      },
      {
        "category": "fiction",
        "author": "Herman Melville",
        "title": "Moby Dick",
        "isbn": "0-553-21311-3",
        "price": 8.99
      }
    ],
    "bicycle": {
      "color": "red",
      "price": 19.95
    }
  },
  "expensive": 10
}
shoeb00 commented 3 months ago

Created a PR for this, it is deployed here @YourAverageTechBro