top | item 14534740

(no title)

br1n0 | 8 years ago

Json il less verbose and is the de facto standard for the web, json is easier to parse by javascript (by the browser or node.js), and a serialization/deseriazation is unique, in xml you could put some infos on the attributes oand other on tags or as parameters. instead of <event name="gamma_size"> <arg name="size" type="uint"/> </event>

{"type":"event", "name":"gamma_size", "arg": {"name":"size","type":"uint" }

discuss

order

Sir_Cmpwn|8 years ago

>Json il less verbose and is the de facto standard for the web, json is easier to parse by javascript (by the browser or node.js)

Wayland is not the web. None of these technologies are involved in Wayland.

>{"type":"event", "name":"gamma_size", "arg": {"name":"size","type":"uint" }

Your example is more verbose and harder to read... XML is definitely misused in many applications where JSON is appropriate but this is not one of them.

pcwalton|8 years ago

JSON has problems, but that's why we have TOML:

    [gamma_size]
    type = "event"
    args = [
       { name = "size", type = "uint" }
    ]
XML isn't what I would choose here because there's no need for text markup. TOML is both simpler and friendlier than XML in this case.

I do agree that it doesn't matter much.