NASA-PDS / pds-api

PDS web APIs specifications and user's manual
http://nasa-pds.github.io/pds-api
Other
5 stars 3 forks source link

Default response of application/json does not appear pretty printed in browser #268

Closed jordanpadams closed 1 year ago

jordanpadams commented 1 year ago

Checked for duplicates

No - I haven't checked

🐛 Describe the bug

When I view any API response in the browser, it is unable to pretty print.

🕵️ Expected behavior

I expected the response to appear more clearly

📜 To Reproduce

view https://pds.nasa.gov/api/search/1/products?q=((product_class%20eq%20%22Product_Context%22)%20and%20(pds:Investigation.pds:type%20eq%20%22Mission%22))&fields=lidvid in a browser

🖥 Environment Info

No response

📚 Version of Software Used

No response

🩺 Test Data / Additional context

No response

🦄 Related requirements

🦄 NASA-PDS/registry-api#248

⚙️ Engineering Details

Per @nutjob4life it appears we may need to add content-type: application/json; charset=utf-8

jordanpadams commented 1 year ago

PEBKAC error. The json formatter plugins tell me that that size of the response tells me that the size of the reponse is too big to expect a fluid rendering, see screenshot:

image

Then I can either highlight anyway or reduce the size of the response with ?limit=2 for example, and the json is rendered nicely.

Example with JSON Viewer v0.18.1 in Chrome