Open hmaracic opened 5 years ago
You can implement and register a custom boolean
ish type for this. Let me know if you would like to give it a try, I'll try to provide pointers.
That would be great, thanks!
Ok. Start by writing your own boolean type.
See:
You can subclass Jsonix.Schema.XSD.Boolean
or write one from the scratch, that's fairly simple.
The you can use your type in your mappings. An example is here:
I even think you can override the default Boolean
type like this.
The unmarshaller already understands "0" as false and "1" as true, which is correct per XML specification.
Could it be possible (if it doesn't exist already) to add some configuration option to output "0" and "1" when marshalling JSON, instead of "false" and "true"?