5 respuestas
Hi Hiteshwar, The wrapper class for your response would be:
You could use tools such as JSON to Apex (https://www.adminbooster.com/tool/json2apex) to convert a JSON response into apex wrapper in future.Hope this helps,Sandeeppublic class AdressWrapper{
public List<String> destination_addresses;
public List<String> origin_addresses;
public cls_rows[] rows;
public String status;//OK
class cls_rows {
public cls_elements[] elements;
}
class cls_elements {
public cls_distance distance;
public cls_duration duration;
public String status; //OK
}
class cls_distance {
public String text; //576 km
public Integer value; //575574
}
class cls_duration {
public String text; //8 hours 33 mins
public Integer value; //30763
}
}