This topic has come up a lot lately. BIRT's ability to use JSON strings, both as a data set, and to serialize large groups of parameters to use in a report, say for a dynamic filter clause in a report. This example shows the ORIGINAL method of parsing JSON strings, using Javascripts eval() method, to create an object representation, and uses a scripted data set to traverse the object structure. Very simple, 1 line solution to parse JSON string.<br />
<br />
There are some cons to using eval(). For more info, please see the following:<br />
http://www.json.org/js.html<br />
http://www.w3schools.com/json/json_eval.asp<br />
<br />
Update: kclark, another talented member of the BIRT community,
posted something similar. In his example, he is using Apache Commons to stream in a JSON file and use as a scripted data source. My example is very simple, and his showcases BIRT's ability to leverage anything within the Java Classpath in a report execution.