[openbox] json as config format!?

Mikael Magnusson lists at bak.och.fr.am
Tue Mar 10 14:19:12 EDT 2009


On Tue, 10 Mar 2009, Dennis Heuer wrote:

> hello
>
> the more i look at the config files the more i wished a gui for them.
> for a luck, the situation isn't so bad with obconf and obmenue.
> however, looking at how compact and complicated even small
> definitions look in XML, i wanted to mention JSON as a possibly better
> format. just look at the both examples below:
>
> <keybind key="S-A-Up">
>  <action name="SendToDesktopUp">
>    <dialog>no</dialog>
>    <wrap>no</wrap>
>  </action>
> </keybind>
>
>
> {"keybind": {"key": "S-A-UP",
>    {"action": {"name": "SendToDesktopUp",
>        {
>          "dialog": "no",
>          "wrap": "no"
> } } } } }
>
> i find that in json one better finds the actual declarations between
> all this containment. ok, json may make heavy use of quotes (and
> brackets). however, if one agrees inofficially that a future json could
> also support symbols, like lisp does, the code could look like this:
>
> {keybind: {key: "S-A-UP",
>  {action: {name: "SendToDesktopUp",
>    {dialog: "no", wrap: "no"}
>  } }
> } }

I find the json version pretty unreadable personally, and since my opinion 
is the most important one, + we're not going to change the config format 
anyway, consider this a no. :)

It also looks like a missing } in that format would be much harder to 
diagnose than xml, which helpfully mentions in each closing tag which 
opening tag it was supposed to match, so it is very easy for the parser to 
find errors.

--
Mikael Magnusson



More information about the openbox mailing list