I need to work with a JSON that has revenue information. This JSON has an object (Recipe) with some object arrays (ingredients, steps).
What would be most appropriate, from the point of view of object orientation: create 3 classes - Recipes
, Ingredients
, Steps
- with attributes received by JSON (id, name for the class Recipes , quantity, measure, ingredient for the class Ingredients, etc ...) or create a single class (Recipes) with the attributes of it (id, name) and two ArrayList
of HashMap
with the values of Ingredients and Steps? And why?