3 ms·
I don't know, xml represents multiline values so much better than json/yaml. Then when it comes to escaping reserved characters, wrapping it in cdata is a lot c
by jcon321 4y ago
I don't know, xml represents multiline values so much better than json/yaml. Then when it comes to escaping reserved characters, wrapping it in cdata is a lot cleaner than json/yaml escaping.
I am currently building something new that uses xml for a properties file. My use case requires sql inside a properties file (without the use of additional .sql files). Really wanted to use json/yaml because I felt like I was in the 90s, but xml was just a lot better for this case.
- pydry 4y agoThis: | Always "seemed" a lot cleaner to me. I dont see why it doesnt accomodate SQL just fine. JSON was never intended primarily for user readability. It's for sending data over a wire. Its focus was on parsing simplicity, ease of serialization and deserialization and to be incidentally readable.
- guiriduro 4y agoOnly works well if your text is a leaf and has no other contained entities/structure. <entity attr="whatever">Try to make this <appearance>look good</appearance> in <markup>YAML</markup></entity> As I said, horses for courses. FWIW I actually like YAML for certain limited use cases, just not where XML is better. And vice versa.
- pydry 4y agoentity: attr: whatever text: |- Try to make this *look good* in **YAML**. ^ I have quite a lot of YAML hanging around these days like this. Markdown is surprisingly effective as an XML document markup replacement.