public class fromJSON{
public cls_Student[] Student;
class cls_Student {
public String Name; //Vinayak
public String branch; //Mech
public String phone; //909090
}
public static fromJSON parse(String json){
return (fromJSON) System.JSON.deserialize(json, fromJSON.class);
}
}
I am trying to print json object into debug log=>
//This is anonymous window code to execute above json.
String js='{"Name":"Vinayak","branch":"Mech","phone":"909090"}';
System.debug(fromJSON.parse(js));
Getting this result in debug logs => 12:01:17:019 USER_DEBUG [2]|DEBUG|fromJSON:[Student=null]