Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Any Type for JSON Response #390

Closed
wants to merge 1 commit into from
Closed

Conversation

Mazyod
Copy link
Contributor

@Mazyod Mazyod commented Apr 14, 2019

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.

I made the changes on Github directly. I'll test more locally and perhaps add tests if you require so.

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.
@Mazyod
Copy link
Contributor Author

Mazyod commented Apr 14, 2019

With this PR, we should be able to avoid the NSDictionary cast here:

return .ok(.json(["status": "ok"] as NSDictionary))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants