Make property/attribute serialization more sane: both deserialization from attributes and serialization to attributes now infer property types based on the current value of the property.