Re:Getting AI to write good SQL
by IncreasePosts on Friday May 16, 2025 @10:52PM
(#44011681)
You're right, it's a bit ridiculous. This is a perfect time to use xml instead of json.
[ Parent
| on HN ]
Clearly the right solution is to use XML Object Notation, aka XON™!
JSON:
{"foo": ["bar", 42]}
XON: <Object>
<Property>
<Key>foo</Key>
<Value>
<Array>
<String>bar</String>
<Number>42</Number>
</Arra>
</Value>
</Property>
</Object>
It gives you all the flexibility of JSON with the mature tooling of XML!Edit: jesus christ, it actually exists https://sevenval.gitbook.io/flat/reference/templating/oxn
We had an IT guy who once bought an XML<->JSON server for $12,000. Very proud of his rack of "data appliances". It made XML like XON out of JSON and JSON that was a soup of elements attributes and ___content___, thus giving you the complexity of XML in JSON. I don't think it got used once by our dev team, and I'm pretty sure it never processed a byte of anything of value.