-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Support for JSONDecoder #210
Comments
Hi Aaron! Adding |
Can't decide on the best way to implement this. Do you think it's acceptable to convert back to data on the fly when requested? Or do we need to go as far back as |
Made a PR for this, need to add unit tests. |
Hi @aasatt, could you check master and see if it is what you needed? Best :) |
Added a Networking/Tests/ResponseTests.swift Lines 7 to 17 in 2a2a41c
|
I hope this helps. Let me know if I can help with anything else :) |
Didn't get a chance to look at it until now. Looks great! Thank you for this! |
With Swift 4 we have
JSONDecoder
to makeData
to our objects. No need to go through array or dictionary body. To use Networking with this it seems we have to turn these results back into JSON data and then pass it into the decoder.What do you think the best way to get the raw data from the result would be?
I was thinking just a
.data
parameter along with.arrayBody
and.dictionaryBody
on theResultType.Success
Would you be open to something like this?
The text was updated successfully, but these errors were encountered: