Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



  This: |
    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.


Only 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.


  entity:
    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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: