Added support for JSON conversion