Currently, the TitleTag and LicenseUsecase are not being properly serialized to their string representations during JSON serialization/deserialization. This can lead to issues with data consistency and accuracy.
To address this issue, we should implement custom Codable methods for these that will ensure they are serialized to the string representations of the respective enums.
The following is a sample method that should be added
init(from decoder: Decoder) throws {
let container = try decoder.singleValueContainer()
let value = try container.decode(String.self)
self.init(value)
}
func encode(to encoder: Encoder) throws {
var container = encoder.singleValueContainer()
try container.encode(value)
}
Currently, the TitleTag and LicenseUsecase are not being properly serialized to their string representations during JSON serialization/deserialization. This can lead to issues with data consistency and accuracy.
To address this issue, we should implement custom Codable methods for these that will ensure they are serialized to the string representations of the respective enums.
The following is a sample method that should be added