I have created json in javascript and I am putting this json in one array. I have stored the array in a database field named “exp_values” like :
[{"concentration":"5","answers":10},{"concentration":"5","answers":20},{"concentration":"5","answers":78}]
I want to retrieve from the database. I am using spring and I created pojo(bean) class like
public class ExperimentParameterBean {
private String username;
private String[] exp_values;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String[] getExp_values() {
return exp_values;
}
public void setExp_values(String[] arrayData) {
this.exp_values = arrayData;
}
}
I used hibernate for retrieving values from the database. I want this array as it is
in java. How can I do this? I have knowledge of spring and hibernate. I want to only get this array from the database in the JSONObject fromat.
my problem solved. i am storing json as text datatype in mysql