I am parsing a string to a POCO object. One of the fields is a nullable long. But in the json it has the value surrounded by strings like so and looks like an empty string.
{
"reqBegin": "1431462651083", (long?)
"reqEnd": "" (long?) <-- should deserialize to null
}
The parser blows up on reqEnd if it is an empty string, instead of setting the object's field value to a null.
I tried to fix this and submit a pull request but I am struggling to figure out how the ParseInt64 and Obj() methods work.
Can someone fix this for me?
I am parsing a string to a POCO object. One of the fields is a nullable long. But in the json it has the value surrounded by strings like so and looks like an empty string.
{
"reqBegin": "1431462651083", (long?)
"reqEnd": "" (long?) <-- should deserialize to null
}
The parser blows up on reqEnd if it is an empty string, instead of setting the object's field value to a null.
I tried to fix this and submit a pull request but I am struggling to figure out how the ParseInt64 and Obj() methods work.
Can someone fix this for me?