More lenient unmarshal type rules
Created by: jpoehls
I'm playing with using this package to unmarshal plist files output by the Day One app. They are a bit quirky in that the data types in their plist file change depending on the data. So for example, in one file a value might be <integer>
but in another <real>
.
I tried to handle this by making my struct fields float64
thinking that the less specific integer
should unmarshal into this just fine. Alas, it did not.
list: type mismatch: tried to decode integer into value of type float64
I'd rather not fall back to unmarshalling this as generic XML. Any chance there is a workaround or some change that could be made to your package to support this scenario? Open to any recommendations you have.