4259 links
  • Arnaud's links
  • Home
  • RSS Feed
  • Tag cloud
  • Login
search: tag:json tag:api — newest first
  • JSON Web Token Introduction - jwt.io
    August 5, 2018 - permalink - https://jwt.io/introduction/
    api json jwt
  • JSON API — Latest Specification (v1.0)
    August 5, 2018 - permalink - http://jsonapi.org/format/
    api format json jsonapi
  • javascript - Is a list/array valid JSON? - Stack Overflow

    31
    down vote
    accepted

    Both forms are valid. However, for an API, I would recommend the second form. The reason is that it gives you a path for expansion of your API.

    For example, if you have an API getUsersInGroup which returns an array of user objects, and later you decide you want to include, say, some aggregate statistics about the users being returned, there's no easy way to do that without breaking existing clients (or including lots of redundant data in each user object). If you use an object, you simply add another field to the object which is silently ignored by clients on a previous version of the API.

    In short, try to avoid top-level primitives wherever possible in your API, and you'll find it easier to expand in the future.

    March 26, 2018 - permalink - https://stackoverflow.com/questions/19623339/is-a-list-array-valid-json
    api json