Commit graph

2 commits

Author SHA1 Message Date
Austin Clements
14883b0700 sprinter: Add a string_len method
This method allows callers to output strings with specific lengths.
It's useful both for strings with embedded NULs (which JSON can
represent, though parser support is apparently spotty), and
non-terminated strings.
2012-08-03 20:21:29 -03:00
craven@gmx.net
36522fca1c Add structured output formatter for JSON and plain text (but don't use them yet).
Using the new structured printer support in sprinter.h, implement
sprinter_json_create, which returns a new JSON structured output
formatter. The formatter prints output similar to the existing JSON, but
with differences in whitespace (mostly newlines, --output=summary prints
the entire message summary on one line, not split across multiple lines).

Also implement a "structured" formatter for plain text that prints
prefixed strings, to be used with notmuch-search.c plain text output.
2012-07-24 09:26:59 -03:00