PlistCpp icon indicating copy to clipboard operation
PlistCpp copied to clipboard

Can't save unsigned integers

Open CelticMinstrel opened this issue 8 years ago • 1 comments

I tried saving a uint64_t and got a "Can't serialize type" exception. Even if you can't support uint64_t (not sure if the plist format can represent it fully), it seems pretty easy to at least support smaller unsigned integer types, since they can be exactly represented by int64_t.

Note: Using the uint64_t works when I read plists with <Foundation.h>, but I have no idea if it silently introduced problems.

CelticMinstrel avatar Sep 23 '16 20:09 CelticMinstrel

It appears that the <Foundation.h> API can and does correctly save unsigned integers greater than 2^63-1, so perhaps it would indeed be good to support uint64_t in the library. I could even send a patch (or pull request) for it.

CelticMinstrel avatar Sep 23 '16 21:09 CelticMinstrel