Added support for JSON_serialize