Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9199819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:37:24+00:00 2026-06-17T22:37:24+00:00

Do standards or best practices exist for structuring JSON responses from an API? Obviously,

  • 0

Do standards or best practices exist for structuring JSON responses from an API? Obviously, every application’s data is different, so that much I’m not concerned with, but rather the “response boilerplate”, if you will. An example of what I mean:

Successful request:

{
  "success": true,
  "payload": {
    /* Application-specific data would go here. */
  }
}

Failed request:

{
  "success": false,
  "payload": {
    /* Application-specific data would go here. */
  },
  "error": {
    "code": 123,
    "message": "An error occurred!"
  }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T22:37:25+00:00Added an answer on June 17, 2026 at 10:37 pm

    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.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In some languages, there are rules/best practices/etc. that promote software safety, ensure expected runtime
I am reading the book C++ Coding Standards: 101 Rules, Guidelines, and Best Practices,
Are there any best practices (or even standards) to store addresses in a consistent
What is the best practice with regard to sending error responses in a JSON
Does anyone know of any best practices or 'standard' techniques for implementing authentication between
What is the most standard or best way to persist data between requests? Should
I have a question regarding best practices when adding targets to a UIButton on
Is there an Android standard or coding convention / best practice that says whether
I'm wondering about standards or commonalities for various common elements on webpages that have
One aspect of javascript that it's hard to find information on is casing practices.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.