Advertisement
Guest User

Untitled

a guest
Sep 28th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. //
  2. // Generated by JSON2Apex http://json2apex.herokuapp.com/
  3. //
  4.  
  5. public class JSON2Apex {
  6.  
  7. public String title;
  8. public List<String> fields;
  9. public List<Integer> types;
  10. public List<String> type_names;
  11. public List<List<String>> values;
  12.  
  13.  
  14. public static JSON2Apex parse(String json) {
  15. return (JSON2Apex) System.JSON.deserialize(json, JSON2Apex.class);
  16. }
  17. }
  18.  
  19. List<Map<String, Object>> parsedObjects = new List<Map<String, Object>>();
  20. for(String[] item: result.values) {
  21. Map<String, Object> itemData = new Map<String, Object>();
  22. for(Integer index = 0, size = result.fields.size(), index < size; index++) {
  23. itemData.put(result.fields[index], item[index]);
  24. }
  25. parsedObjects.add(itemData);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement