Render List returned via JQuery

Render List returned via JQuery

Hello , 
@ Server side , I have a list into a bean .
@ Client side , I use :

  1. function callJava() {   
  2. $.getJSON("../reference/test", { name: $('#name').val()}, function(result) {
  3.                          // result is a bean that has a list 
  4.           alert(result.fooList.length);
  5. });
  6. }
I need to be able to render this list later via FreeMarker .
What is killing me when I replaced this list with a String variable , it works fine like : 
  1. function callJava() {   
  2. $.getJSON("../reference/test", { name: $('#name').val()}, function(result) {
  3. alert(result.stringVariable)
  4.            
  5. });
  6. }
How could I deal with the string into that bean !!