i have a json response object but i unable to create a class structure for following json response object .
{
"PWSESSIONRS": [
{
"PWPROCESSRS": {
"PWHEADER": {
"APP_ID": "HSA",
"ORG_ID": "HSA",
"OUT_PROCESS_ID": "weconnect_validate",
"IN_PROCESS_ID": "weconnect_validate",
"LOGIN_ID": "TEST10800"
},
"PWDATA": {
"weconnect_validate": {
"Row": [
{
"success": "1"
}
]
}
}
}
}
]
}
Please suggest me some class structure. I have created following class structure but Json.Convert
unable to deserialize it.
public class LoginSuccess
{
public List<PwProcessorSuccess> PWSESSIONRS { get; set; }
}
public class RowSuccess
{
public string success { get; set; }
}
public class WeconnectValidateSuccess
{
public List<RowSuccess> Row { get; set; }
}
public class PwDataSuccess
{
public WeconnectValidateSuccess weconnect_validate { get; set; }
}
public class PwHeaderSucess
{
public string LOGIN_ID { get; set; }
public string ORG_ID { get; set; }
public string APP_ID { get; set; }
public string IN_PROCESS_ID { get; set; }
public string OUT_PROCESS_ID { get; set; }
}
public class PwProcessorSuccess
{
public PwHeaderSucess PWHEADER { get; set; }
public PwDataSuccess PWDATA { get; set; }
}
Please help.
I made the classes for you from the beginning so that following code to help you a lot and your problem will be solved instantly.
You can use the below code: