API Design · Junior · Question 40 of 75
What is JSON Schema used for in APIs?
- 1Encrypting JSON
- 2Compressing JSON
- ✓Correct answer: Describing and validating the structure of JSON data, e.g. request and response bodies
Explanation
OpenAPI uses JSON Schema for its data models. Many frameworks validate requests directly against schemas.