Currently working with the most annoying web service! I'm using Newtonsoft Json.Net.
When I request data, a bool property EndOfDay
is sent as true
or false
- deserialize works fine BUT annoyingly, when I send data to the web service, for this same field I have to send either a 0 or 1 - don't ask why as I couldn't give you a good answer - All I know is I can't change it.
Is there a way of serializing bools to 0 or 1 even though when I deserialize the strings will be true/false or should I admit defeat and have separate objects which are almost identical except for this one property - one object has a bool and the other an int?