I have been trying to create json from a java object / class that has a nested class. However only the top level class is output in Json. I want to return json from a web services application or alternatively covert json to a java object with nested classes
public class JsonData {
static String firstName;
static String lastName;
static String streetName;
static String cityName;
static String stateName;
static PersonalInfo personalInfo = new PersonalInfo();
// typical set and get followed by the nested class
static class PersonalInfo {
String height;
String weight;
String eyeColor;
String favoriteColor;
// getter's and setters for this class
}
}
// in a separate method that handles the web service request set the values...
&