Skip to content

Release 1.5

Latest
Compare
Choose a tag to compare
@scramjet scramjet released this 18 Jul 07:01

Please note this is a breaking change if you're using EDN containing characters.

It's become clear that [NSNumber numberWithUnsignedChar] is not the correct ObjC mapping for EDN characters: e.g. other libraries such as a serialisation library we've encountered can generate these for small numbers. There's no way in this case to say the value should be encoded as a number not a unicode character, as shown by:

(lldb) po [@'a' class]
__NSCFNumber

(lldb) po [@((int8_t)97) class]
__NSCFNumber

(lldb) po [@'a' objCType]
"c"

(lldb) po [@((int8_t)97) objCType]
"c"

In this release, EDN characters are mapped to MPEdnCharacter, which is a simple wrapper around a unichar value.