I'm using amcharts to build graph on a visualforce page. The amcharts's input is JSON. So I parse my object to JSON string using JSON.serializePretty. Using this approach, the graph is built fine and fast as long as data size is small. But the VF page will be loaded more and more slowly if I increase the data size. Finally, the following error will occur because of the appearance of large JSON string in VF page.

```
Response size exceeded 15MB organization limit

```

How could I fix this problem? Is there anyway to pass large string from controller to VF page more efficiently? Any advice would be appreciated.

**My code**

This is a part of the controller:

```
private List<ChartRecord> chartData;

public ChartController(){
    getAllData();
    //JSON string created here.
    dataJson = JSON.serializePretty(chartData);
}

// Wrapper class
public class ChartRecord {
    public Integer rowIndex { get; set; }
    public Decimal score { get; set; }
    public ChartRecord (Integer rowIndex, Decimal score) {
        this.rowIndex = rowIndex;
        this.score = score/100;
    }

```

And then the JSON string is passed to amcharts.

```
AmCharts.ready(function () {
var data = {!dataJson};
....
}

```

The JSON string shown in page source:

```
AmCharts.ready(function () {
    var data = [ {
  "score" : 0.996920641888553,
  "rowIndex" : 1
}, {
  "score" : 1.9421192769522631,
  "rowIndex" : 2
}, {
  "score" : 2.8873179120159732,
  "rowIndex" : 3
}, ...

```