Skip to content

0.6.0

Compare
Choose a tag to compare
@yfakariya yfakariya released this 09 Aug 09:05
· 848 commits to master since this release

It is major update.

  • New Features
    • Deserializer now uses 'best match' constructor when all members are read-only. Issue #52.
    • MessagePackSerializer.UnpackMessagePackObject API. This is convinient shortcut to deserialize stream as MessagePackObject tree.
    • Add Type Embedding. Issue #47.
    • New utility method of SerializationContext to switch back the behavior to previous version's one.
    • Add corlib only build (MsgPack.Unity3D.Micro). This build only depends mscorlib. This feature is experimental. Related to Issue #70.
  • Breaking Changes
    • Non-public types such as internal/Assembly types are not supported even if WinRT or Reflection serializer had worked for them because it had been just bug and non-public types should not be serialized.
      Note that .NET default serializers and pre-generated serializers for Xamarin are not affected because they had failed to generate serializers for non-public types.
    • Unity3D DLL now only depends on mscorlib.dll. This breaks compabitlity because the library cannot recognize Stack, Queue, NameValueCollection, and System.Uri. If you want to these types support, use Unity3D.Full drop instead.
    • By defualt, System.DateTime, System.DateTimeOffset, System.Runtime.InteropServices.ComTypes.FILETIME are now serialized native representation instead of Unix epoc milliseconds. You can use SerializationContext.Default = SerializationContext.ConfigureClassic() or setting SerializationContext.DefaultDateTimeConversion to revert classic setting.
  • Improvements
    • Add many workarounds for AOT issues of Mono on iOS (in particular, Unity).
    • System.DateTime, System.DateTimeOffset, System.Runtime.InteropServices.ComTypes.FILETIME are now serialized native representation by default, it keeps 100-nanosecond resolution, DateTimeKind, and Offset.
      You can revert the behavior to the previous Unix Epoc via SerializationContext.DefaultDateTimeConversion or [MessagePackDateTimeMember] custom attribute. Issue #74
    • System.DBNull become serializable now. Issue #72.
    • Non-SZ arrays (multidimensional arrays and vector with non-zero based) are supproted. Issue #81.
    • Add built-in support for IReadOnlyCollection, IReadOnlyList, IReadOnlyDictionary<TKey, TValue>, based upon issue #91 and PR #93. Thank you @drewnoakes!
    • Improve exception message for known type mapping error. Issue #95,
    • ImmutableArray now supported.
    • SerializerGenerator now support automatic dependent serializer(s) generation.
    • Add SerializerContext.ResolveSerializer event to make pre-built serializer registration more robust. Issue #103.
  • Bug Fixes
    • Non-public types causes TypeLoadException in .NET and pre-generated assembly, causes compilation error in pre-generated sources, results undefined behavior on other platforms.
      Non-public types are now rejected with SerializationException. This fix leads (probably small) breaking changes.
    • MessagePackSerializer.Create now always returns new instance.
    • Fix build problem related to interface generic parameter variance.
    • Fix System.Object instance causes StackOverflowException. Issue #73
    • Remove FILETIME dependency to avoid build error in Xamarin/Unity. Issue #87
    • Fix Unity source code to avoid nullable equality operator. Issue #88
    • Fix MessagePackObject deserializer cannot handle empty collection correctly. Issue #92.
    • Fix disposing "subtree" Unpacker twice causes Exception.
    • Fix Unpacker does not handle bin types and str8 type in skipping. PR #98, Thank you @webcoyote!
    • Fix Unpacker does not handle ext types in skipping.
    • Fix SerializerGenerator and mpu.exe do not handle EnumSerializationMethod. Issue #102.
    • Fix SerializerGenerator and mpu.exe do not exclude types which are handled with built-in serializers. Issue #104.