IBM's JSONx, or how to represent JSON in XML
-
Yesterday at work.
Weng: "that leaves the difficulty of handling an xml file that large"
Minion: "we could translate it to JSON"
-
Although it's still WTFy, you do have the possibility of saving a few bytes here and there for the end elements, especially if your local XML
abominationschema has long tag names compared to the contents of said elements.
-
-
Ha. Of the literally hundreds of XML schemas my system has handled over the years (when I say we deal with arbitrary XML formats, I fucking mean it), precisely none have ticked all these boxes:
- Well formed XML (80 percent failure rate)
- Came with an XSD or DTD that was actually accurate (95 percent don't have one, the other 5 percent don't validate)
- Schema changes are discussed in advance (10 percent failure rate. At least one dialect gets passed through a clever XSLT to translate it's ever growing list of elements to a key value store)
- Has appropriate use of nesting (I.e. a collection of students instead of student1, student2 etc. (90 percent failure rate where applicable)
- Has names of reasonable length. (30 percent failure rate).
- otherwise generally sanely structured
This is probably because nobody in our unit has ever been involved in the process of specifying the format. Either customers come to us format in hand, idiot internal mainframe teams try to XML, or sales invents one
-
I've have rarely seen XML used properly. Even worse is so of the horrific things people do in .config files in asp.net applications.
json is being adopted pretty much to some extent in most web frameworks, and all of the nicer tools seem to be using it for dependency management.
XML tbh is just too much work to do well considering I think it is far too heavy for 95% of the stuff you probably want to do.
-
I write SQL in XML.
Seriously
-
I write SQL in XML
I hear they have rehabilitation clinics to treat that condition now
-
Unfortunately I can't flag this to "Notify the men in white coats".
-
... do you work on one of my teams?
-
XML tbh is just too much work to do well considering I think it is far too heavy for 95% of the stuff you probably want to do.
This is something I could take seriously if you were suggesting that the replacement was S-Expressions.
-
Not regular expressions?
-
This post is deleted!
-
@Husky said in IBM's JSONx, or how to represent JSON in XML:
I'm not sure if you can make an application that speaks JSON be understood by an application that speaks XML using this. From what I gathered, you can represent JSON in XML, not translate.
But I agree, it can have some real, practical uses. Though everything I can imagine that might need this is very probably a WTF by itself...
Opens it up to XSLT processing. Which it already was as regular JSON.
-
@Gribnit you're 2 years too early for getting that nice goddamit banner