本文介绍了领域:使用Alamofire将JSON映射到领域对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用Realm和Alamofire将JSON映射到我的数据库对象。
I would like to use Realm and Alamofire to map JSON to my database objects. Are there good tutorials out there?
推荐答案
Realm提供了内置的有限功能,可以将任意JSON结构映射到 RLMObjects
。但是有一些好的第三方库,可以帮助您解决用例。您可能要检查以下内容:
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:
- (Objective-C),它提供了一种声明性的,类似于Mantle的方式来定义您的映射
- (Swift),它提供Realm和Alamofire支持
- Realm-JSON (Objective-C), which offers a declarative, Mantle like way of defining your mapping
- ObjectMapper (Swift), which offers Realm and Alamofire support
这篇关于领域:使用Alamofire将JSON映射到领域对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!