You need to sign in to do that
Don't have an account?
hiteshwar marni
jsonparsing help
{"Message":"Number of Post office(s) found: 21","Status":"Success","PostOffice":[{"Name":"Baroda House","Description":"","BranchType":"Sub Post Office","DeliveryStatus":"Non-Delivery","Taluk":"New Delhi","Circle":"New Delhi","District":"Central Delhi","Division":"New Delhi Central","Region":"Delhi","State":"Delhi","Country":"India"}]}
The above is my json string.
I have written the following code deserialize it
global class wrapper{
global class parserr
{
global string Message{get;set;}
global string Status{get;set;}
global list<postoffice>po{get;set;}
}
global class postoffice
{
global string name{get;set;}
global string Description{get;set;}
global string BranchType{get;set;}
global string DeliveryStatus{get;set;}
global string Taluk{get;set;}
global string Circle{get;set;}
global string District{get;set;}
global string Division{get;set;}
global string Region{get;set;}
global string state{get;set;}
global string country{get;set;}
}
}
p= (wrapper.paresrr)JSON.deserialize(JSONresponse, wrapper.parserr.class);
I'm getting the values of Message and status correctly. But list<postoffice> po is getting as null although values are coming into response.And also I want the values in postoffice class also.
Thanks
The above is my json string.
I have written the following code deserialize it
global class wrapper{
global class parserr
{
global string Message{get;set;}
global string Status{get;set;}
global list<postoffice>po{get;set;}
}
global class postoffice
{
global string name{get;set;}
global string Description{get;set;}
global string BranchType{get;set;}
global string DeliveryStatus{get;set;}
global string Taluk{get;set;}
global string Circle{get;set;}
global string District{get;set;}
global string Division{get;set;}
global string Region{get;set;}
global string state{get;set;}
global string country{get;set;}
}
}
p= (wrapper.paresrr)JSON.deserialize(JSONresponse, wrapper.parserr.class);
I'm getting the values of Message and status correctly. But list<postoffice> po is getting as null although values are coming into response.And also I want the values in postoffice class also.
Thanks
Please try this once
All Answers
Please try this once