Let's say I have a class like this:
public class Person {
private String firstName;
private String lastName;
...
}
Then I create a map like this:
Map<Person, String> map = new HashMap<Person, String>();
map.put(new Person("Bob", "Builder"), "string1");
map.put(new Person("Bob", "NotBuilding"), "string2");
What should a valid json representation of the above look like? if it is indeed possible?