79808043

Date: 2025-11-03 15:56:29
Score: 0.5
Natty:
Report link

Though the question is a little vague, I will assume that it's about JSON:API vs REST. JSON:API is a specification for using JSON whereas REST is an architecture pattern.

The JSON: API spec is compatible with REST which means they are not mutually exclusive and can be considered complementary to each other.

At a high level:

  1. To interface with a REST API, make HTTP requests using the standard methods (or verbs) to endpoints (specific URIs) provided by the service. Ideally thse endpoints will be documented in a way that any consumer can easily understand (such as the Open API spec). How you parse the results depends on what the results are. They could be JSON, XML, HTML or plaintext.

  2. To interface with a JSON:API you will need to make HTTP requests using its specific MIME type ad follow the recommended schema from the specification. To parse the result you will need to use the relevant methods or packages your programming language of choice provides. In JavaScript it's JSON.parse

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: rjbultitude