draios/sysdig — pull request #138 by kristopolous (2014-04-29 01:52:52+00:00)
Title: Implements #22 JSON output

Introduces a JSON root in every tostring call of
sinsp_evt_formatter regardless. This may be better to break into
separate calls for the really paranoid.

Otherwise, it derives the key name from the field_info of the token
and then assigns the str value as returned by tostring.

When its done with one round it uses the JSON Fastwriter to return
the std::string back...

The third party JSON-CPP library had one line changed: The fastwriter
part of it would output a newline for us. This was already being handled
and would produce two new lines. So I removed that from the library.

JSON is a finished standard and I don't expect many "upgrades" to the
library so I think this is a change we can live with.