diff --git a/packages/framework/lib/src/core/response_context.dart b/packages/framework/lib/src/core/response_context.dart index de41610d..a62f0ed7 100644 --- a/packages/framework/lib/src/core/response_context.dart +++ b/packages/framework/lib/src/core/response_context.dart @@ -169,9 +169,8 @@ abstract class ResponseContext } /// Serializes JSON to the response. - void json(value) => this - ..contentType = MediaType('application', 'json') - ..serialize(value); + Future json(value) => + this.serialize(value, contentType: MediaType('application', 'json')); /// Returns a JSONP response. ///