zepheira / babel

Web service for translating between different information representations
Other
9 stars 5 forks source link

Generate valid JSON #1

Open zepheiryan opened 12 years ago

zepheiryan commented 12 years ago

Babel tends to generate invalid JSON according to the JSON 2.0 specification. Built-in browser libraries cannot parse its output. Repair it and make sure its output works in a JSON validator.

ransford commented 11 years ago

During the service.simile-widgets.org outage of the past few days, I wanted to modify my script that pumps BibTeX through the hosted Babel service, so I wrote a little offline JSON linter that uses Python's json library -- which works fine and is super simple, but it can't parse Babel's JSON output because of invalid escaping (the Apache Commons JSON escaper inexplicably escapes single quotes within double quotes).

Would you consider a patch that made Babel use a JSON library like JSON-lib instead of the Apache Commons one?