a2 / MessagePack.swift

It's like JSON, but fast and small…and Swift! – msgpack.org[Swift]
http://msgpack.org
MIT License
283 stars 60 forks source link

Added subscripted setters #28

Closed monyschuk closed 8 years ago

monyschuk commented 8 years ago

Enhanced subscript operators, providing setters for both .Map and .Array style MessagePackValues.

Subscript operators now always return a MessagePackValue, if only just a .Nil, allowing if-let-less traversal of nested MessagePackValue enumerations.

Count now always returns a value - 0 for non .Map or .Array types. This provides the start of a path to adding CollectionType conformance to the enumeration.