Redesign default .json format
See original GitHub issueThe default JSON just isn’t right. I find myself using ?_shape=array
for almost everything I build against the API.
Issue Analytics
- State:
- Created 3 years ago
- Comments:48 (43 by maintainers)
Top Results From Across the Web
JSON Formatter & Validator
The JSON Formatter & Validator beautifies and debugs JSON data with advanced formatting and validation algorithms.
Read more >Redesign JSON output, ditch jsono, offer variants controlled ...
I want to support three variants for the rows output: a list of lists, with a columns key saying what they are a...
Read more >Default JSON Result Format - Vespa Documentation
The default JSON result format is used when presentation.format is unset or set to json . Results are rendered with one or more...
Read more >JSON And BSON - MongoDB
Learn how MongoDB uses the lightweight and flexible BSON, an extension JSON, to maximize efficiency for programming languages.
Read more >Best practices for REST API design - Stack Overflow Blog
JSON is a concise, fairly readable, widely used format for data persistence and transfer. Also, it's in fashion. So it's a good “go...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great point about CORS, I hadn’t considered that.
I think I’m going to keep the
Link:
header (added in #1014) because I quite enjoy using it with GitHub and WordPress, but I’m not going to have it be the default way of doing pagination. For the default shape I’m now leaning towards this:So three keys:
total
,rows
andnext_url
. Then extra keys can be added using?_extra=
with various named bundles.OK, I’m back to the “top level object as the default” side of things now - it’s pretty much unanimous at this point, and it’s certainly true that it’s not a decision you’ll even regret.