On Tue, Jul 10 2012, craven@gmx.net wrote: > Sorry, the original patch I sent was missing a small part, here the full > patch: > > As discussed in <id:20120121220407.GK16740@mit.edu>, this patch adds > support for new structured output formats (like s-expressions) by using > stateful structure_printers. An implementation of the JSON structure > printer that passes all tests is included. > > Structure printers have functions for starting a map, a list, closing > any number of these two, printing a map key, a number value, a string > value, and boolean values. By threading a state through the > invocations, arbitrary structured formatting can be achieved. > > In a second patch, the structured output code should be isolated in a > separate file, and also used in all other parts of notmuch. Hi, Peter. Thanks for submitting this. I would really like to see this patch broken up into multiple smaller and more atomic patches. Smaller patches are much easier to read and review. For instance, all the new formatting functions could be added in their own patch (and already in their own file if that's appropriate). Then the existing json output could then be modified to use the new formatters. There is also json output in notmuch show and reply as well, so they should probably also be modified to use the new formatter. Thanks! jamie.