I have a field in a server-side object model that’s a boolean. I’m writing a custom json converter and I’m wondering how best encode this for json. Should I leave it as a boolean or should I convert true to 1 and false to 0.
What’s the best way to do this?
Thanks.
I prefer using the true/false keywords in my JSON, but 1/0 will still work. Is your question on how to write the code to create this JSON object? It depends on how you are implementing the converter. What have you got so far?