I have the following request
{
"name":"Ajeesh",
"description":"hello",
"platform_settings":[
{"key":"value"},
{"key1":"key2"}.. // This key value can be anything upto n times
]
}
I have created a POJO for the above as follows
package com.payunow.socialsharemodule.models;
import com.fasterxml.jackson.databind.ObjectMapper;// in play 2.3
import java.util.List;
import java.util.Map;
public class Share {
private String name;
private String description;
public String getName() {
return name;
}
public String getDescription() {
return description;
}
public void setName(String name) {
this.name = name;
}
public void setDescription(String description) {
this.description = description;
}
@Override
public String toString(){
return getName() + ", "+getDescription();
}
}
How will I define platform_settings array of objects when converting the JSON to Java objects?