RSS is what we had before algorithms that just pick adverts and far right fuckery.
I am so old that I worked with SGML. Compared to that, XML is a lovely language. And sometimes I still miss writing XSLT to quickly transform some XML documents. These days you can do similar things with JSON, of course. But itโs not as easy and standardized as the XML tooling.
Reddit support to the rescueโฆ
Json is superior and thats a hill im willing to die on
Thatโs silly, if Json was superior the web would be using HTJson, not HTML.
(YAML has entered the fight!)
(Edit: incidentally, Iโm not saying YAML is the best. JSON is possibly the one I hate thr least. But I do hate them all!)
XML is a superior format to Json or yaml or any of those other trendy formats around today. Itโs the hill Iโm willing to die on because Iโm right.
XML aims to be both human-readable and machine-readable, but manages neither. Itโs only really worth it if you actually need the complexity or extensibility, otherwise itโs just a major pain to map XML structures to any sensible type representation. Iโve been forced to work with some of the protocols that people like to present as examples of good XML usage and I hate every single one of them.
Fuck YAML though. That spec is longer and more complex than any other markup language I know of and it doesnโt have a single fully compliant implementation.
Iโm okay with the โhuman-readability,โ but Iโve never been happy with the โmachine-readibilityโ of XML. Usually I just want to pull a few values from an API return, yet every XML library assumes I want the entire file in a data structure that I can iterate through. Itโs a waste of resources and a pain in the ass.
Even though itโs not the โrightโ way, most of the time I just use regex to grab whatever exists between an opening and closing tag. If Iโm saving/loading data from my own software, I just use a serialization library.
Yep, itโs a PITA to parse and get the values you want. Much prefer JSON. Recently when I needed to parse XML I ran it through an XML to JSON library. Much easier!
If you need to parse XML just for RSS though, it isnโt so bad as there are RSS specific libraries which take most of the pain away.
Yeah, I remember when I was trying to parse XML into some lua tables and it forever stumped me how to represent something like
<thing important_param=10 other_param="abracadabra"> stuff </thing>
You just have to have different ways to turn different tags into stuff in your program and thatโs a huge amount of overhead to think about when all I want is a hash map and maybe an array.
From my point of view : it has a hudge ecosystem with tons of robust libraries. This does not make it perfect, but for an industrial point of view, you donโt look for new shiny clean things. (My point of view is 15 years old yetโฆ)
Something being โoldโ is totally unrelated to whether itโs trendy. See: virtually every food and fashion trend.
Uh-huhโฆ ever tried to integrate with a poorly implement WCF service? Like communication from a Java service to a dotnet service through a WSDL?
Iโll take a json API over XML any day
Iโm not sure thatโs the fault of XML though.
Itโs more the fault of the implementation and documentation.
We have a WCF service with an odd configuration and nobody has been able to integrate with it that didnโt use Microsoft tools. Itโs definitely not XMLโs fault.
(That service has been replaced with a REST API now)
Itโs more the fault of the implementation and documentation.
Yea sure. Though itโs slightly XMLs fault for allowing that kinda implementations. Every random thing is in itโs own obscure namespace with 20 levels of nested objects in different namespaces, and if you get anything wrong it barely explains whatโs wrong, and just refuses to work.
Itโs mostly WCFs fault. I just automatically associate XML with nightmare flashbacks of implementing WCF stuff