You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am then trying to convert an object to JSON Dictionary using this (to convert a comment from one RealmComment (Realm+JSON) to an MBComment (ObjectMapper)
classfunc realmCommentToMbComment(realmComment:RealmComment)->MBComment{varnewMbComment=MBComment()letrealm=try!Realm()try! realm.write{letJSONString= realmComment.JSONDictionary
newMbComment =Mapper<MBComment>().map(JSONString)! //this is using ObjectMapper
}return newMbComment
}
However, this will not compile and gives me an error "Value of type RealmComment has no member JSONDictionary".
The text was updated successfully, but these errors were encountered:
I have been trying to implement this on my current Swift project, but cannot get it working. Here is my model:
I am then trying to convert an object to JSON Dictionary using this (to convert a comment from one RealmComment (Realm+JSON) to an MBComment (ObjectMapper)
However, this will not compile and gives me an error "Value of type RealmComment has no member JSONDictionary".
The text was updated successfully, but these errors were encountered: