Skip to content
This repository has been archived by the owner on Apr 29, 2019. It is now read-only.

Alternative to ResponseHandler's Requirement of JSONInitializable #43

Open
ghost opened this issue Feb 20, 2017 · 0 comments
Open

Alternative to ResponseHandler's Requirement of JSONInitializable #43

ghost opened this issue Feb 20, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Feb 20, 2017

At this time, the ResponseHandler protocol process method requires that the Output generic type conform to the JSONInitializable protocol. This is not ideal, as we could want to create other response handlers than simply JSON (such as plist, csv, raw text, etc.).

As of Swift 3, protocols can have associated types, but these require concrete types and may not themselves be protocols. Ideally, associated protocols, whereby the Output type could be constrained by, would be preferable.

Alternatives should be explored and this protocol definition made more flexible and clear.

@ghost ghost added the enhancement label Feb 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

0 participants