I don't see what is 'odd' about it.
A text exception is returned if the serialize has issues.
0 is returned for unsupported media
1 is returned for ok
Therefore you need to string compare 0 (avoiding warnings if the string
is an exception), and string compres ne 1..
It's not the API design I'd have _chosen_ myself, but it makes perfect
sense (and the fact that string not numeric comparison is being used
makes sense).
Cheers
t0m