json-streamer: add handling for JSON_ERROR token/state
authorMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 1 Jun 2011 17:14:59 +0000 (12:14 -0500)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 7 Jun 2011 18:52:11 +0000 (13:52 -0500)
commit1d2616f8711d3a22e2adc7bee5a30a069636e8d4
tree2d58d81dfeb624c1128a01c563f36a2cbc410db8
parent80458633c5a160852fb3aa239383b2feac75b149
json-streamer: add handling for JSON_ERROR token/state

This allows a JSON_ERROR state to be passed to the streamer to force a
flush of the current tokens and pass a NULL token list to the parser
rather that have it churn on bad data. (Alternatively we could just not
pass it to the parser at all, but it may be useful to push there errors
up the stack. NULL token lists are not currently handled by the parser,
the next patch will address that)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
json-streamer.c