Is there any standard for JSON API response format?

Yes there are a couple of standards (albeit some liberties on the definition of standard) that have emerged:

  1. JSON API – JSON API covers creating and updating resources as well, not just responses.
  2. JSend – Simple and probably what you are already doing.
  3. OData JSON Protocol – Very complicated.
  4. HAL – Like OData but aiming to be HATEOAS like.

There are also JSON API description formats:

  • Swagger
    • JSON Schema (used by swagger but you could use it stand alone)
  • WADL in JSON
  • RAML
  • HAL because HATEOAS in theory is self describing.

Leave a Comment