Add json output.

See Issue #112