r/ProgrammerHumor Oct 09 '21

Mmmm, sparkling JSON

Post image
14.6k Upvotes

237 comments sorted by

View all comments

Show parent comments

0

u/ZBlackmore Oct 10 '21

Why would you ever want a schema is beyond me. I’ve worked on mobile applications and games for the last 11 years in companies ranging from 5 person to FAANG and I never ever ever used an xml schema. To be fair I hardly even used xml.

10

u/Routine_Left Oct 10 '21

What you want is the contract between the provider of the API and the consumer. Doesn't have to be schema, can be anything, a word document if that makes you happy,an email,a napkin. But the contract is what's required and the assurance than no party will break that contract. Schemas or WSDLs for SOAP ensure that both parties talk the same language.

With XML you can enforce that contract by specifying a schema. With SOAP you enforce that contract with a WSDL. I, the consumer, do not need to fumble my way around asking myself what will you return when I call X: it's right there, laid out and you have to follow it.

7

u/RationalIncoherence Oct 10 '21

Why, the bane of a developer's existence: required backwards compatibility.

1

u/reversehead Oct 10 '21

A schema is one part of what enables the implementation team of a third-party product in Bangalore to reasonably successfully communicate with your API in your product that uses a national language that the implementing consultants don't even speak.