Insomnia: [Feature Request] Table View for JSON response

Created on 6 Jun 2017  路  9Comments  路  Source: Kong/insomnia

image

stale

Most helpful comment

@gschier

What is "Table View for JSON response"

Take the following data as example:

[
    {
        "_key": "100",
        "title": "Case#100"
    },
    {
        "_key": "101",
        "title": "Case#101"
    }
]

We can display it like this:

| _key | title |
| :------------- | :------------- |
| 100 | Case#100 |
| 101 | Case#101 |

Why it would be useful

  • More readable
  • Leverage the horizontal space to display items more compactly

image


Note a selector may be provided for picking "item list" from the json response, e.g. result.products.

All 9 comments

Hi @wonderbeyond. Can you provide some more information on this request? More details on "what" this is and "why" it would be useful would be awesome 馃槃

@gschier

What is "Table View for JSON response"

Take the following data as example:

[
    {
        "_key": "100",
        "title": "Case#100"
    },
    {
        "_key": "101",
        "title": "Case#101"
    }
]

We can display it like this:

| _key | title |
| :------------- | :------------- |
| 100 | Case#100 |
| 101 | Case#101 |

Why it would be useful

  • More readable
  • Leverage the horizontal space to display items more compactly

image


Note a selector may be provided for picking "item list" from the json response, e.g. result.products.

Yes! Something like JSON Data Ninja built in would be incredible...

Since a table view would only work with a very specific data format, I hesitate to include it as a general feature. However, I _would_ be open to adding something like this instead: https://github.com/alexkuz/react-json-tree

image

@gschier I think that would work just as well! 馃憤

The above comment is sort of tech savvy. I was requesting in another thread #529 to go for something like the Altova XML Spy provides. This way it's more user friendly (at least you don't have to keep expanding / collapsing the object hierarchy. It'd be really nice if this is available for both request (for editing or previewing raw JSON body section) and response panes.

Another point to note that this shouldn't be limited to JSON content only. It's better to expand for XML as well. Better to have the title rephrased to Grid or Table view for JSON & XML content.

Reference URL: http://manual.altova.com/xmlspy/spyenterprise/xseditingviews_gridview_tables.htm
or, http://valentin.dasdeck.com/lingo/dml/screenshots/xmlspy_grid_view.png

@ray-qu @gschier
https://github.com/getinsomnia/insomnia/issues/534 may cover this feature. We can add custom templates for rendering json/xml into table view.

Ya. I think the problem is best solved by extending the plugin system to allow for custom content type viewers, which would allow both solutions. I mentioned this over here as well https://github.com/getinsomnia/insomnia/issues/529#issuecomment-339036179

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings