I am trying to parse a json data file that has a singular object inside two different ArrayLists:
{
"TA": [
{
"firstname": "John",
"lastname": "Smith"
},
{
"firstname": "Jane",
"lastname": "Doe"
}
],
"Student": [
{
"firstname": "John",
"lastname": "Smith"
},
{
"firstname": "Kevin",
"lastname": "White"
}
]
}
My current parsing method just creates a new Person object for each one and adds them to each List object, but I want my Person object John Smith to only be a singular object referenced by both "TA" list and "Student" list. How could I go about doing this?