From dc3cb02dccecabcba1b678afedfcc879bc08d094 Mon Sep 17 00:00:00 2001 From: Maz Jaleel Date: Sun, 14 Apr 2019 13:01:33 +0400 Subject: [PATCH] Allow Any Type for JSON Response Using `AnyObject` type prohibits the use of Swift collections (Array, Dictionary). Instead of casting them to Objective C equivalent (NSArray, NSDictionary), probably best to support the `Any` type. --- Sources/HttpResponse.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/HttpResponse.swift b/Sources/HttpResponse.swift index 31377477..d3ddfc43 100644 --- a/Sources/HttpResponse.swift +++ b/Sources/HttpResponse.swift @@ -22,7 +22,7 @@ public protocol HttpResponseBodyWriter { public enum HttpResponseBody { - case json(AnyObject) + case json(Any) case html(String) case text(String) case data(Data)