'JSON deserialization & serialization
I am working on one JSON payload and trying to deserialize it but not getting any value after deserialization
Here is my payload
{
"01/01/2010":{
"Frequency":3,
"term": 24
},
"01/01/2011":{
"Frequency":6,
"term": 12
},
"01/01/2012":{
"Frequency":1,
"term": 36
}
}
I create class for this
public class CustomWrapper {
public Date date1 {get;set;}
public class Parameter{
public integer Frequency {get;set;}
public integer term {get;set;}
}
}
Can someone please help me if I am doing anything wrong ?
Solution 1:[1]
Without seeing which library you're using or the code to deserialize it, my guess would be that it's having trouble with Date. Technically the datestamp is a string and you need to provide some format string to turn that into an actual date object.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | NickP |
