Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to Create Object Class for GSON parsing in Android for following JSON string?
    text
    copied!<pre><code>{ "errorDesc": "", "ownerId": 2096, "departments": "Asset Protection,Backroom Flow,Bakery,Clinic,Dairy,Deli,Distribution (Communication),Facilities Management,Frozen,Guest Experience,Human Resources,Instocks,Meat,Optical,POG and Adjacencies,Pharmacy,Photo Lab,Portrait Studio,Presentation,Price Accuracy,Produce/Floral,Remodel,Reverse Logistics,Sales Floor: A&amp;A,Sales Floor: Grocery,Sales Floor: Hardlines,Sales Floor: Health &amp; Beauty,Sales Floor: Home,Signing and Fixtures,Starbucks,Store,Target Cafe", "validUser": "Y", "clientId": "TGT", "displayPrio": "Y", "allowSimpleProject": "Y", "simpleProjectType": "SIM", "reqDept": { "STORE_AP": "Asset Protection", "STORE_BF": "Backroom Flow", "STORE_BAKERY": "Bakery", "STORE_CLINIC": "Clinic", "STORE_DAIRY": "Dairy", "STORE_DELI": "Deli", "STORE_DISTRIBUTI": "Distribution (Communication)", "STORE_FM": "Facilities Management", "STORE_FROZEN": "Frozen", "STORE_GE": "Guest Experience", "STORE_HR": "Human Resources", "STORE_INSTOCKS": "Instocks", "STORE_MEAT": "Meat", "STORE_OPTICAL": "Optical", "STORE_POG": "POG and Adjacencies", "STORE_PHARM": "Pharmacy", "STORE_PL": "Photo Lab", "STORE_PS": "Portrait Studio", "STORE_PRESENTATI": "Presentation", "STORE_PA": "Price Accuracy", "STORE_PROD": "Produce/Floral", "STORE_REMODEL": "Remodel", "STORE_RL": "Reverse Logistics", "STORE_AA": "Sales Floor: A&amp;A", "STORE_GROC": "Sales Floor: Grocery", "STORE_SFH": "Sales Floor: Hardlines", "STORE_HB": "Sales Floor: Health &amp; Beauty", "STORE_HOME": "Sales Floor: Home", "STORE_SIGNFIX": "Signing and Fixtures", "STORE_STARBUCKS": "Starbucks", "STORE": "Store", "STORE_TC": "Target Cafe" }, "viewOptions": null, "sessionId": "c170be7b-81a3-4d95-a204-af72d166d28e", "unitName": "MPLS-NICOLLET MALL", "userId": "dderr-st", "userName": "Dan Derr - Store", "errorCd": "0", "profiles": "STL/Store Team Lead,Specialist", "view": "", "unitId": "1375" } </code></pre> <p>Can somebody plz help ..how to create Object class for above JSON string </p> <p>so that i can achieve this - Gson gson = new Gson();</p> <pre><code> Register register_class = gson.fromJson(registration_response,Register.class); register_list.add(register_class); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload