问题
I would like to use Realm and Alamofire to map JSON to my database objects. Are there good tutorials out there?
回答1:
Realm offers built-in limited capabilities of mapping arbitrary JSON structures to RLMObjects
. But there are some good third-party libraries, which could assist you with your use-case. You might want to checkout these:
- Realm-JSON (Objective-C), which offers a declarative, Mantle like way of defining your mapping
- ObjectMapper (Swift), which offers Realm and Alamofire support
来源:https://stackoverflow.com/questions/33479733/realm-map-json-to-realm-objects-with-alamofire