Added support for JSON payload.