Skip to main content

Posts

Showing posts from October, 2018

Parse array of string Realm + ObjectMapper in Swift4

Parse array of String for Realm with ObjectMapper Response JSON: {     id: 210,     images: ["image1","image2","image3"] }  Swift Model file : public class Value: Object {     @objc public dynamic var image: String ? } class   : Object , Mappable {     @objc dynamic var id = 0          var images = List < Value >()     override static func primaryKey() -> String ? {         return "id"     }          //Impl. of Mappable protocol     required convenience init ?(map: Map ) {         self . init ()     }          func mapping(map: Map ) {                                           //Used scr...