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
If using propertyConverters to convert an id to an object when encoding. Upon decoding, the convert does not replace the object with an ID but instead replaces it with an empty dictionary.
// Convert the Any value to a NSObject value
var (unboxedValue, valueType, isObject) = valueForAny(theObject, key: originalKey, anyValue: value, conversionOptions: conversionOptions, isCachable: isCachable, parents: parents)
if let v = value as? EVCustomReflectable {
unboxedValue = v.toCodableValue() as AnyObject
valueType = "String"
isObject = false
}
if conversionOptions.contains(.Encoding), let ro = theObject as? EVReflectable {
unboxedValue = ro.encodePropertyValue(value: unboxedValue, key: originalKey) as AnyObject
}
isObject is set to true (because it's an object) and then below:
if isObject {
if let obj = unboxedValue as? EVReflectable {
if let json = obj.customConverter() {
unboxedValue = json as AnyObject
} else {
// sub objects will be added as a dictionary itself.
let (dict, _) = toDictionary(unboxedValue as? NSObject ?? NSObject(), conversionOptions: conversionOptions, isCachable: isCachable, parents: parents)
unboxedValue = dict
}
} else {
// sub objects will be added as a dictionary itself.
let (dict, _) = toDictionary(unboxedValue as? NSObject ?? NSObject(), conversionOptions: conversionOptions, isCachable: isCachable, parents: parents)
unboxedValue = dict
}
} else if let array = unboxedValue as? [NSObject] {
unboxedValue gets set to an empty dict rather then being set as a value further down
The text was updated successfully, but these errors were encountered:
If using propertyConverters to convert an id to an object when encoding. Upon decoding, the convert does not replace the object with an ID but instead replaces it with an empty dictionary.
For example:
In EVReflection:
isObject is set to true (because it's an object) and then below:
unboxedValue gets set to an empty dict rather then being set as a value further down
The text was updated successfully, but these errors were encountered: