|
|
|
|
|
by izuchukwu
1766 days ago
|
|
There are ways to specify schemas for JSON and XML. However, for APIs, XML's gone and schemas for JSON never caught on. JSON is a serialized JS object, which itself is untyped, so anything can be in any order. Think NoSQL databases. This simplicity gave JSON the ability to be adopted by a multitude of languages very, very quickly. Foolish, maybe, but you could build Stripe on it. GraphQL, an emerging API standard, does feature schemas, and its rise is bringing types back to APIs. It can be a bit more work to implement than JSON, though. It's the classic complex-simple-complex pendulum swing. We're not done, either. |
|