http://search.cpan.org/~makamaka/JSON-2.59/lib/JSON.pm#convert_blessed (this is used by the JSON serializer)