On Fri, Jan 28, 2011 at 9:00 PM, Richard Hipp <[email protected]> wrote:

> I'm not using the code and so I could be wrong.  But it seems to me that
> the output would be more useful as an array of objects:
>
> [{"rid":10733, "uuid":"136ac24170b24db53197c00154d4424558e28eda",...},
>  {"rid":10732, "uuid":"13165785e1deb2de3b1fb9014f5c7c7b290f0f4e",...},
>  ...]
>
> Your output is an object containing arrays of arrays, which seems harder to
> use:
>

Yes, that's very true. The reasoning behind this structure (which i use in
other projects) is because:

a) in large JSON outputs the extra copies of the keys add significant
amounts to the data size. JSON is often the format of choice because it's so
compact.
b) In most JSON-reading languages (primarily JS), it is trivial to normalize
the data to the format you demonstrate.

If that logic doesn't hold up for fossil, i'll add an impl which does the
"fat" style. We can of course make it configurable via another option,
perhaps -j for "slim" and -J for "fat".

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to