Come on, why isn't it apparently possible to implement a DWIM principle in these formats?
This actually makes me angry. Well, not really but it's fun to pretend. The sloppy, half-assed XML that exists because of HTML and sloppy, half-assed programmers who ignored the standard, has caused many of us tons of woe. If you are being served broken JSON or XML, push back, push back hard. There is no excuse for anyone generating garbage here and the more lenient the tools are, the more the heap of trash will grow to block out the sun!!!
Boo! But really. Don't accept broken XML or JSON.