|
This page documents Clover-for-Ant's implementation of JSON data and how to make use of it. On this page: Why JSON?The JSON format is supported as an output type in Clover specifically to create integration opportunities with other applications. The JSON data from Clover is easy to manipulate programmatically, allowing innovative developers to use it for displaying or processing their coverage data in novel ways. Clover-Ant code for JSON output Examples of JSON report usageJSON for a file page: The "lines" array contains the hit counts for each line in the BCodec.java file. JSON in an HTML page:
Clover Historical Data in JSONPYou can also access Clover historical data using JSON or JSONP. If your coverage data is available online, you could view your coverage inside a Google Gadget. Using this data, you can create your own visualisations in Javascript or HTML. The data from Clover is compatible with the Google Visualisation API. Basic example: This is the basic JSON object produced by Clover. The above JSON object may be passed directly to a Example for use with Javascript: Example Clover Gadget: The screenshot below shows Clover historical data in a Gadget: The XML source for this gadget is as follows: Screenshot: Clover in a Google Gadget |
|
|
|
|
|







