Closed sagits closed 7 years ago
Before going into details... I see this is an older version. A couple of versions ago I change the line where the crash is to:'
if theValue is Array<Any> {
return (theValue as AnyObject, valueType, false)
}
Besides that I also migrated these extensions into EVReflection itself. It's now a subspec. You install it by using:
pod "EVReflection/Alamofire"
Functionally it has not been changed.
One other thing. In the current version you don't need the 'required init' anymore when using generics.
If you want to see generics sample code, then have a look at the files EVReflectionWorkaroundSwiftGenericsTests and NestedGenericsIssue25
I will now have a look at your code to see if I see something strange.
Thanks for answering. Its giving me a "unable to satisfy dependencies" on the pod "EVReflection/Alamofire". Should i include EVReflection too? By now i have:
pod "EVReflection/Alamofire"
pod "AlamofireJsonToObjects", '~> 2.4.0'
EDIT
I understand it now. Alamofire is part of EVReflection (like you said). I had to do a:
pod repo update
To be able to found the pod "EVReflection/Alamofire". I was able to solve my issue updating the pod to the EVReflection subpod.
Hi @evermeer , i was used to use AlamofireJsonToObjects with swift 2.3 and now im trying to update my apps to swift 3.0. Im have some problems with arrays:
My ws basically has a JsonMessage object which can have an array of objects or a single object (JsonMessageSingle and JsonMessageList). I was able to parse the JsonMessageSingle normally using Generics, but it stuck on this screen when trying to parse the json below (im not sure, but i guessed it cant parse the generic array):
May you help me please? Thanks in advance.