Symbols are handled as String when used as Dictionary keys, but not in an Array. Is there any specific reason that CFPropertyList does not support it?
I'm converting a hash to an array of arrays because Dictionary type in Obj-C / Swift is not ordered. I believe it would be a typical use case to do something like {small: 'Small', large: 'Large'}.to_a.
data = [["Large", :large],["Small", :small]]
plist = CFPropertyList::List.new
plist.value = CFPropertyList.guess(data)
CFTypeError: Unknown class Symbol. Try using :convert_unknown_to_string if you want to use unknown object types!
No specific reason. I will add support for it. In the meantime you can use CFPropertyList.guess(data, :convert_unknown_to_string => true) as a work-around.
Symbols are handled as String when used as Dictionary keys, but not in an Array. Is there any specific reason that CFPropertyList does not support it?
I'm converting a hash to an array of arrays because Dictionary type in Obj-C / Swift is not ordered. I believe it would be a typical use case to do something like
{small: 'Small', large: 'Large'}.to_a
.