how to parse this result array with gson?. I stuck for two days i can not parse. From SO and few other places, I have found that I need to define a top level container but I do not know how to complete its definition.
results:[
{
"SupplierCatalog": {
"supplier_catalog_id": "139",
"distributor_id": "57",
"distributor_asking_price": "999.99",
"supplier_id": null,
"product_name": "jjjjjjjj j j j j j j jj j jjjjjjjjjjjj",
"product_description": "kkkkkkkkkkkkkk k k k k"
},
"image_details": {
"isCustomImageProvided": 0,
"isImageUploadedTo": 1,
}
},
{
"SupplierCatalog": {
"supplier_catalog_id": "138",
"distributor_id": "57",
"distributor_asking_price": "69.25",
"supplier_id": null,
"product_name": "i+am+editing+this",
"product_description": "using+wait+for+it..........+the+API"
},
"image_details": {
"isCustomImageProvided": 1,
"isImageUploadedTo": 1,
}
},
{
"SupplierCatalog": {
"supplier_catalog_id": "137",
"distributor_id": "57",
"distributor_asking_price": "69.69",
"supplier_id": null,
"product_name": "Supplier Created Product Sample",
"product_description": "This is a sample description"
},
"image_details": {
"isCustomImageProvided": 1,
"isImageUploadedTo": 1,
}
},
{
"SupplierCatalog": {
"supplier_catalog_id": "136",
"distributor_id": "57",
"distributor_asking_price": "45.58",
"supplier_id": null,
"product_name": "Distributor Created Product Sample",
"product_description": "Blah Blah Blah"
},
"image_details": {
"isCustomImageProvided": 1,
"isImageUploadedTo": 1,
}
},
{
"SupplierCatalog": {
"supplier_catalog_id": "135",
"distributor_id": "57",
"distributor_asking_price": "99.99",
"supplier_id": null,
"product_name": "Distributor Created Product Sample",
"product_description": "In publishing and graphic design, lorem ipsum is a filler text commonly used to demonstrate the graphic elements of a document or visual presentation. Replacing meaningful content that could be distracting with placeholder text may allow viewers to focus on graphic aspects such as font, typography, and page layout.\r\n\r\nThe lorem ipsum text is typically a scrambled section of De finibus bonorum et malorum, a 1st-century BC Latin text by Cicero, with words altered, added, and removed such that it is nonsensical, improper Latin.\r\n\r\nA variation of the ordinary lorem ipsum text has been used in typesetting since the 1960s or earlier, when it was popularized by advertisements for Letraset transfer sheets. It was introduced to the Information Age in the mid-1980s by Aldus Corporation, which employed it in graphics and word processing templates for its desktop publishing program, PageMaker, for the Apple Macintosh.[1]"
},
"image_details": {
"isCustomImageProvided": 1,
"isImageUploadedTo": 1,
}
}
]
I can not parse with making two class. so please help. And after that how i get individual get method. Thanks.