{
"itemType": [
{
"id": 1,
"name": "Bamboo Sword",
"image": "bamboosword.png"
"atkModifier": "+4",
"price": 4000
"ele": "E"
},
{
"id": 2,
"name": "Simple Sword",
"image": "simplesword.png"
"atkModifier": "+8",
"price": 8000
"ele": "E"
}
]
}
I have an Item class and I would like to parse the JSON and create the Item dynamically. Let's say this Item class accept the data in the JSON as input :
Item(id, name, image, atk, price, ele);
How do I do that?