I've got a class which conforms to Decodable protocol (fetching data from API) and I would like to save it in the Realm database. Problem occurs when one of my properties is array (List). It says Cannot automatically synthesize Decodable because List<Item> does not conform to Decodable
What is the best way to bypass this problem? Realm only supports arrays of primitive types.
here is my class:
class PartValue: Object, Decodable {
@objc dynamic var idetifier: Int = 0
let items = List<Item>()
}