wvteijlingen / Spine

A Swift library for working with JSON:API APIs. It supports mapping to custom model classes, fetching, advanced querying, linking and persisting.
MIT License
264 stars 109 forks source link

format() and unformat() could return Any instead of AnyObject #135

Closed Blackjacx closed 7 years ago

Blackjacx commented 7 years ago

If ValueFormatter's functions format() and unformat() would return Any instead of AnyObject I could write a ValueFormatter that transforms a dictionary of latitude and longitude to a CLLocationCoordinate2D struct. Now I am forced to convert it to CLLocation object which means unnecessary overhead.

I'm sure there are more advantages to this.

wvteijlingen commented 7 years ago

That would be a nice update to the current system. Unfortunately Spine currently uses KVC to get and set values on resource objects. This means that we can only use it with reference types afaik.