This project has moved and is read-only. For the latest updates, please go here.

Custom JsonConverter for String->Number

Apr 7, 2012 at 7:49 AM

I currently want to serialize some data.

The problem I have got that sometimes I get ->
"Name", "Value"
and sometimes
"Name", Value

Value is always a number. If I declare it as Integer(Or any other fitting numeric type) it throws an Exception. If I declare it as String it works fine. I would like to keep it as Integer.

In this thread JamesNK told me to use a custom JsonConverter, but I do not know where to start.