> The main benefit of a well-known format is that the requirement for a
> client goes from easy parsing code to *no* parsing code.

Right.  So either we add a dependency on JSON to babeld, or we add
a trivial parser to every program that consumes babeld's input.

> In this example, parsing the custom format in Python would be something like:

No, parsing input using string.split is always incorrect.  You really want
to write a proper lexer.

The lexer I posted above is 70 lines of C, including full error checking.
In Python, it's probably 15 to 20 lines.  Is it really worth switching to
a bloated and unreadable format in order to avoid 20 lines of code in each

The problem that JSON aims to solve is not very complicated, and JSON doesn't
solve it particularly well.

-- Juliusz

Babel-users mailing list

Reply via email to