bhollis / jsonview

A web extension that helps you view JSON documents in the browser.
http://jsonview.com
MIT License
1.53k stars 227 forks source link

Unable to format application/alps+json #137

Closed VonUniGE closed 6 years ago

VonUniGE commented 7 years ago

On a webservice, I receive a json document with Content-Type set to application/alps+json;charset=UTF-8. In the preferences, I've set the Alternate JSON content types to application/alps+json the json document is displayed but in one line without the same good-looking formatting, I obtain if I'm working with application/hal+json content-type.

Am I missing something or is this a bug?

This is the alps+json document: { "alps" : { "version" : "1.0", "descriptors" : [ { "id" : "city-representation", "href" : "http://localhost:8080/api/profile/cities", "descriptors" : [ { "name" : "name", "type" : "SEMANTIC" }, { "name" : "state", "type" : "SEMANTIC" }, { "name" : "country", "type" : "SEMANTIC" }, { "name" : "map", "type" : "SEMANTIC" } ] }, { "id" : "get-cities", "name" : "cities", "type" : "SAFE", "rt" : "#city-representation", "descriptors" : [ { "name" : "page", "doc" : { "value" : "The page to return.", "format" : "TEXT" }, "type" : "SEMANTIC" }, { "name" : "size", "doc" : { "value" : "The size of the page to return.", "format" : "TEXT" }, "type" : "SEMANTIC" }, { "name" : "sort", "doc" : { "value" : "The sorting criteria to use to calculate the content of the page.", "format" : "TEXT" }, "type" : "SEMANTIC" } ] }, { "id" : "create-cities", "name" : "cities", "type" : "UNSAFE", "rt" : "#city-representation" }, { "id" : "update-city", "name" : "city", "type" : "IDEMPOTENT", "rt" : "#city-representation" }, { "id" : "delete-city", "name" : "city", "type" : "IDEMPOTENT", "rt" : "#city-representation" }, { "id" : "get-city", "name" : "city", "type" : "SAFE", "rt" : "#city-representation" }, { "id" : "patch-city", "name" : "city", "type" : "UNSAFE", "rt" : "#city-representation" }, { "name" : "findByNameContainingAndCountryContainingAllIgnoringCase", "type" : "SAFE", "descriptors" : [ { "name" : "name", "type" : "SEMANTIC" }, { "name" : "country", "type" : "SEMANTIC" } ] }, { "name" : "findByNameAndCountryAllIgnoringCase", "type" : "SAFE", "descriptors" : [ { "name" : "name", "type" : "SEMANTIC" }, { "name" : "country", "type" : "SEMANTIC" } ] } ] } }

bhollis commented 6 years ago

JSONView 2.0.0 now supports these content types.