4 ms·
> XMPP spoke XML in an age of JSON Damn, let's ditch all the XML protocols then, XHTML first :D What does "age of JSON" means exactly? Those are two different
by edhelas 8y ago
> XMPP spoke XML in an age of JSON
Damn, let's ditch all the XML protocols then, XHTML first :D
What does "age of JSON" means exactly? Those are two different technologies for different purposes.
Even if XMPP tried to move to JSON, how can you do namespaces in JSON for example?
You want ActivityPub in XMPP ? Just take Pubsub and put Atom in it, those are two stable and proven technologies, they fits perfectly (it's just one namespace in another) and with many many benefits.
Here is a news feed built on top of XMPP Pubsub https://nl.movim.eu/?node/pubsub.movim.eu/Movim https://nl.movim.eu/?node/pubsub.movim.eu/Movim, and yes there's also an Atom 1.0 feed generated from it, because it's easy to just extract the (validated) Atom content from Pubsub and put it back to a proper HTTP page.
- zinid 8y ago> age of JSON Yeah, modern and shiny JSON. IT is now a subdivision of the fashion industry. Suck it up ;)
- PurpleRamen 8y ago> how can you do namespaces in JSON for example? For what is this neccessary?
- gmueckl 8y agoNsmespaces allow XML file formats flexible and extensible in interesting ways: each namespace is tied to an independent schema, allowing for a very natural nesting of validatable XML in arbitrary formats. The namespaces avoid name collision between XML tags from different schemas. The grandparent gave a good example of this kind of nesting. JSON is incapable of the same kind of nesting because there are no explicit namespace to identify nested data formats and to avoid name collisions.
- ekidd 8y agoXML namespaces do offer some nice possibilities. But the lack of official JSON namespaces doesn't prevent you from doing something like: { "built_in": "value", "org.example.my_extension": "value" } If you want to validate it, you might need to jump through some JSON schema hoops, of course.
- lolsal 8y agoIt seems that would make JSON likely more verbose than XML.
- PurpleRamen 8y agoYes, it's a nice option for some settings. But why is it neccessary in this context? Where there is a defined data-exchange format which would not have name collisions happen?
- gmueckl 8y agoXMPP as an extensible protocol (it's even in the name!) relies on XML namespaces to avoid collisions between extensions. Were it to use something like JSON, extensions would all have to be aware of each other so that no naming collisions or other awkward behaviour can occur.
- tambourine_man 8y agoI don’t think XML was the reason for XMPP not catching on. Facebook could use a format based on brainfuck and we would have to support it.