Class JSONOutput
java.lang.Object
com.invirgance.convirgance.output.JSONOutput
- All Implemented Interfaces:
Output
Provides support for writing a stream of data as JSON formatted objects. This
format will simulate a JSON array by writing opening and closing brackets along
with commas after each JSON object. This makes the JSON compatible with most
viewer tools and query tools like
jq. JSON objects are written
one per line to make the output easier to verify with unix command-line tools.- Author:
- jbanes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the MIME type 'application/json'Obtain an output cursor to manually write data to the output stream
-
Constructor Details
-
JSONOutput
public JSONOutput()
-
-
Method Details
-
write
Obtain an output cursor to manually write data to the output stream -
getContentType
Returns the MIME type 'application/json'- Specified by:
getContentTypein interfaceOutput- Returns:
- the mime type for this format
-