3 ms·
Could you please humor me as to why this is a bad idea? I don't seem to have an eye for these types of problems.
by algorithmsRcool 12y ago
Could you please humor me as to why this is a bad idea? I don't seem to have an eye for these types of problems.
- Retra 12y agoCheck the other replies to this. They've filled it in a bit...
- nkurz 12y agoI don't understand either, and would benefit from a clear statement. Is there a universally agreed upon better way? Are those criticizing it presuming the particular use case of schema-less data deserialization and saying that it doesn't fully specify the object?
- throwawaymsft 12y agoIn JSON the server would have returned account as an array with 2 elements. In XML you are left to figure that out for yourself. It's hardly clear that there could be several accounts but never several ids. (Yes, you can wrap it with an <accounts> node and make your data extremely verbose.) What about attributes? Should we ever expect them on the user? What if there's an attribute id as well, is it the same? (Oh, just download a schema to tell you what to expect! Argh...)