had to deal with ibm once. we were developing an application for a customer and ibm was working on some new service for them. of course the customer insisted we use the new ibm service, even though it solved a problem we didn't have at all. the ibm product was a website to be used by end users, while our application had to pass our end users data through. so, i asked the ibm guys (via the customer) to give me the docs for their json interface, as i don't necessarily want to parse HTML inside the application to exchange data. there was no json interface - html was all they had -, but they got to work implementing one.
what i got was:
{"elem" : "html", "children": [ ... {"elem" : "form", "attrs" : {"action": "/an_url", "method" : "post"}, children: [{"input" : {"attrs" : {"type" : "submit", "value" : "..."}}}]} ..., ]}
yes, their json interface was the DOM, serialized as json. but it gets better. to submit my data i had to fill in the actual values in their json struct at the appropriate nodes and send it back.
i'm a) pretty sure this "json interface" feature cost the customer more than i make in a year, and b) it probably broke the very instant the customer let a frontend/designer guy change the html code months later.
what i got was:
yes, their json interface was the DOM, serialized as json. but it gets better. to submit my data i had to fill in the actual values in their json struct at the appropriate nodes and send it back.i'm a) pretty sure this "json interface" feature cost the customer more than i make in a year, and b) it probably broke the very instant the customer let a frontend/designer guy change the html code months later.