[weboob] RFC: a multi-line json formatter

Laurent Bachelier laurent at bachelier.name
Wed May 7 00:04:59 CEST 2014

On 2014-05-06 21:08, Guilhem Bonnefille wrote:
> Hi,
> Since few days, I'm hacking around videoob in order to integrate this
> part of weboob inside GUI applications.
> In order to communicate, I use JSON format because it is easy. By
> "easy" I mean JSON parsers already exists, so I just have to
> concentrate on my glue code and forget the creation of an adhoc parser
> for any other output provided by weboob. But this format has an issue
> in my context: it is a single response (an array of JSON elements).
> So, the GUI application has to wait all Webbob's backends before being
> able to display anything.
> Is it possible to imagine an other JSON formatter providing one JSON
> result structure per line, displaying them as soon as the backend has
> computed them?
> Doing so, the GUI application will be able to display partial results,
> giving a better feedback to the user.
> Any comment appreciated.

This is a great idea, and here is my proposal:

There is one JSON object per line. Of course, you cannot parse it in one
step, but it allows results to be streamed.

More information about the weboob mailing list