I agree with you, and that's how most of the time I was doing my API replies. I was mostly curious on why people are doing it differently.
One explanation on why it's better to have an array of objects is that it's easier to map the response in strong typed languages like java or c#.
I guess. I've never used JSONApi so I can't comment on that either. I'm definitely, sadly, in the RESTish camp.
Technically JSON API is rest, let's say just a bit more structured.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I agree with you, and that's how most of the time I was doing my API replies. I was mostly curious on why people are doing it differently.
One explanation on why it's better to have an array of objects is that it's easier to map the response in strong typed languages like java or c#.
I guess. I've never used JSONApi so I can't comment on that either. I'm definitely, sadly, in the RESTish camp.
Technically JSON API is rest, let's say just a bit more structured.