git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC/PATCH 0/3] JSON/XML output for scripting interface
@ 2010-04-11 11:37 Julian Phillips
  2010-04-11 11:37 ` [RFC/PATCH 1/3] strbuf: Add strbuf_vaddf function Julian Phillips
                   ` (3 more replies)
  0 siblings, 4 replies; 24+ messages in thread
From: Julian Phillips @ 2010-04-11 11:37 UTC (permalink / raw)
  To: git; +Cc: Eric Raymond, Junio C Hamano

Here is an attempt at making a format agnostic structured output library.  The
idea being that the command doing the output doesn't have to care what the
actual output format is, it just uses the abstract notion of objects and arrays.

The current backend/frontend interface probably needs expanding so that a less
noddy XML output can be used, but it's a start.

Rather than building an in-memory structure and then writing it out I've gone
for the approach of writing out immediately.  The thought behind this was that I
didn't really want to force commands like log to have to wait 'til the end to
start outputting information.

The JSON output is formatted differently from my previous JSON-only status
modification, but the actual information output is the same (i.e. the output of
a json parser should be identical ignoring item ordering in objects).

Julian Phillips (3):
  strbuf: Add strbuf_vaddf function
  add a library of code for producing structured output
  status: add support for structured output

 Makefile         |    3 +
 builtin/commit.c |   12 +++
 output-json.c    |  128 ++++++++++++++++++++++++++++++++
 output-xml.c     |   68 +++++++++++++++++
 output.c         |  212 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 output.h         |   71 ++++++++++++++++++
 strbuf.c         |   13 +++-
 strbuf.h         |    1 +
 wt-status.c      |   73 +++++++++++++++++++
 wt-status.h      |    2 +
 10 files changed, 581 insertions(+), 2 deletions(-)
 create mode 100644 output-json.c
 create mode 100644 output-xml.c
 create mode 100644 output.c
 create mode 100644 output.h

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2010-04-11 23:30 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-11 11:37 [RFC/PATCH 0/3] JSON/XML output for scripting interface Julian Phillips
2010-04-11 11:37 ` [RFC/PATCH 1/3] strbuf: Add strbuf_vaddf function Julian Phillips
2010-04-11 12:42   ` Erik Faye-Lund
2010-04-11 12:59     ` Julian Phillips
2010-04-11 11:37 ` [RFC/PATCH 2/3] add a library of code for producing structured output Julian Phillips
2010-04-11 12:51   ` Erik Faye-Lund
2010-04-11 13:03     ` Julian Phillips
2010-04-11 15:46   ` Jakub Narebski
2010-04-11 18:16   ` Junio C Hamano
2010-04-11 18:26     ` Sverre Rabbelier
2010-04-11 19:21     ` Julian Phillips
2010-04-11 20:34       ` Jakub Narebski
2010-04-11 20:46         ` Julian Phillips
2010-04-11 20:57           ` Eric Raymond
2010-04-11 11:37 ` [RFC/PATCH 3/3] status: add support for " Julian Phillips
2010-04-11 15:48 ` [RFC/PATCH 0/3] JSON/XML output for scripting interface Sverre Rabbelier
2010-04-11 17:30   ` Julian Phillips
2010-04-11 17:34     ` Sverre Rabbelier
2010-04-11 17:45       ` Julian Phillips
2010-04-11 17:50         ` Sverre Rabbelier
2010-04-11 22:22           ` Jon Seymour
2010-04-11 22:34             ` Eric Raymond
2010-04-11 23:25             ` Jon Seymour
2010-04-11 23:30               ` Julian Phillips

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).