You need to sign in to do that
Don't have an account?
rohit singh 92
i am trying to parse a json variable but i am unable to do so
here is the array format
( [Criteria] => stdClass Object ( [Host] => C1N3 [RequestDate] => 2016-05-08T19:42:59.2865950Z [RequestIP] => 182.50.78.8 [TransactionId] => 077811dd-81ce-4330-85ea-6267f109c0b2 [Address] => 1013 Young Cir [City] => Corona [FirstName] => elias [LastName] => yanni [MatchLevels] => E1;E2;N1;N2 [PostalCode] => 92881 [Sources] => C;D;M [State] => CA ) [Phones] => Array ( [0] => stdClass Object ( [AreaCode] => 714 [LineType] => LandLine [MatchLevel] => E1 [MaxValidationLevel] => E1 [PhoneNumber] => 8298032 [Source] => C ) ) )
i am trying to parse the "phones" internal variables but i am unable to parse ..i got a parser class from heroku
public class JSON2Apex {
public class Phones {
public String AreaCode;
public String LineType;
public String MatchLevel;
public String MaxValidationLevel;
public String PhoneNumber;
public String Source;
}
public Criteria Criteria;
public List<Phones> Phones;
public class Criteria {
public String Host;
public String RequestDate;
public String RequestIP;
public String TransactionId;
public String Address;
public String City;
public String FirstName;
public String LastName;
public String MatchLevels;
public String PostalCode;
public String Sources;
public String State;
}
public static JSON2Apex parse(String json) {
return (JSON2Apex) System.JSON.deserialize(json, JSON2Apex.class);
}
}
my syntax to parse the json "phones" internal varibale is :
JSON2Apex jtop = JSON2Apex.parse(AccurateResponse);
jtop.Phones
please guide me what should i do after this to get "Phones internal variable"
( [Criteria] => stdClass Object ( [Host] => C1N3 [RequestDate] => 2016-05-08T19:42:59.2865950Z [RequestIP] => 182.50.78.8 [TransactionId] => 077811dd-81ce-4330-85ea-6267f109c0b2 [Address] => 1013 Young Cir [City] => Corona [FirstName] => elias [LastName] => yanni [MatchLevels] => E1;E2;N1;N2 [PostalCode] => 92881 [Sources] => C;D;M [State] => CA ) [Phones] => Array ( [0] => stdClass Object ( [AreaCode] => 714 [LineType] => LandLine [MatchLevel] => E1 [MaxValidationLevel] => E1 [PhoneNumber] => 8298032 [Source] => C ) ) )
i am trying to parse the "phones" internal variables but i am unable to parse ..i got a parser class from heroku
public class JSON2Apex {
public class Phones {
public String AreaCode;
public String LineType;
public String MatchLevel;
public String MaxValidationLevel;
public String PhoneNumber;
public String Source;
}
public Criteria Criteria;
public List<Phones> Phones;
public class Criteria {
public String Host;
public String RequestDate;
public String RequestIP;
public String TransactionId;
public String Address;
public String City;
public String FirstName;
public String LastName;
public String MatchLevels;
public String PostalCode;
public String Sources;
public String State;
}
public static JSON2Apex parse(String json) {
return (JSON2Apex) System.JSON.deserialize(json, JSON2Apex.class);
}
}
my syntax to parse the json "phones" internal varibale is :
JSON2Apex jtop = JSON2Apex.parse(AccurateResponse);
jtop.Phones
please guide me what should i do after this to get "Phones internal variable"