0
[
    [
        {
            "description": "",
            "product": "Apple",
            "quantity": "2"
        },
        {
            "description": "",
            "product": "Apple",
            "quantity": "2"
        },
        {
            "description": "",
            "product": "Apple",
            "quantity": "2"
        }
    ],
    [
        {
            "description": "",
            "product": "banana",
            "quantity": "1"
        },
        {
            "description": "",
            "product": "banana",
            "quantity": "1"
        },
        {
            "description": "",
            "product": "banana",
            "quantity": "1"
        }
    ]
]

This is my class

public class items_list{

    private String product;
    private String quantity;
    private String description;


    public items_list(String product, String quantity, String description) {
        this.product = product;
        this.quantity = quantity;
        this.description = description;
    }
}

This is how my ArrayList look like

ArrayList<ArrayList<items_list>> list = new ArrayList<>();

I am a developing an android app to save a arraylist of object, and I want to store an arraylist of arraylist of object. I have no problem converting it into json file using gson, but I am having difficulty converting it back. Pointers would be appreciated:)

2

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.