Skip to content

v4.0.0-pre.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@axunonb axunonb released this 16 Sep 21:56
· 2 commits to version/4.0 since this release
445bcdb

Release Notes v4.0.0-pre.1

Breaking changes

  • Invoke ICustomSerializers and IKnownTypes with ISerializationContext as additional parameter.
  • For ICustomSerializers and IKnownTypes a single instance is used for all invokations (instead of one instance per invokation)
  • YAXSerializationOptions now have flag None = 0. SerializeNullObjects is still the default, and is set in the CTOR of YAXSerializer.
  • Migrate YAXLib using Nullable Reference Types (aka #nullable enable)
  • Default SerializerOptions.MaxRecursion = 50 (was 300 before). Can be changed, if needed.
  • Remove types and members marked as obsolete in v3

Features

  • Add generic YAXSerializer<T>
  • Use caching and object pooling for better performance
    • Increase speed by factor > 5.5
    • Descrease GC pressure by factor > 5.5
  • Custom IKnownTypes can be dynamically added and removed. WellKnownTypes are public now.
  • ISerializationContext contains ITypeContext, IMemberContext?, SerializerOptions, RecursionCount for a better implementation experience of ICustomSerializers and IKnownTypes. Block recursive calls to ICustomSerializers and IKnownTypes.
  • ITypeContext offers methods
    • to de/serialize the current type. This leaves the heavy lifting to the IYAXSerializer.
    • GetFieldsForSerialization() and GetFieldsForDeserialization() to get fields identified by IYaxSerializer.
  • ICustomSerializers can be also be invoked using a private constructor
  • Exception and derived classes can be serialized and deserialized fast and reliably
  • Add option to serialize private members from base types (YAXSerializableTypeAttribute.IncludePrivateMembersFromBaseTypes)
  • Add NetStandard2.1 as target framework, containing specific optimizations

What's Changed

  • ICustomSerializers may have an interface as the generic argument by @axunonb in #169
  • Update to VS2022 and update NuGet key by @axunonb in #171
  • Type handling and related exceptions by @axunonb in #172
  • Added GitHub Action for SonarCloud integration by @axunonb in #173
  • Add generic constructor by @OrbintSoft in #170
  • Fix SonarCloud CI by @axunonb in #178
  • Add SerializationContext to ICustomSerializer by @axunonb in #181
  • Trigger SonarCloud also for 'version/**' branches by @axunonb in #182
  • Remove codecov integration and replace badges with SonarCloud badges by @304NotModified in #185
  • Added IYAXSerializer and proper inheritance for YAXSerializer by @304NotModified in #183
  • Fix: SonarCloud do not support analysis of forked PRs by @axunonb in #187
  • Remove usage of obsolete constructors and members in unit tests and demo app by @axunonb in #189
  • Remove obsolete YAXLib classes and methods by @axunonb in #190
  • All (de)serialize tests for the generic and non-generic version by @304NotModified in #194
  • Improve maintainability: SonarCloud Cognitive Complexity <= 20 by @axunonb in #186
  • Add option to serialize private members from base types by @axunonb in #192
  • Extend caching and use object pooling for better performance by @axunonb in #199
  • Move methods from YAXSerializer to UdtWrapper by @axunonb in #200
  • Refactor Known Types by @axunonb in #202
  • Refactor custom serialization and known type serialization by @axunonb in #204
  • Add NetStandard2.1 as target framework by @axunonb in #207
  • Add text embedding for XML elements, option to strip invalid XML chars by @axunonb in #208
  • Refactor YAXLib for Nullable Reference Types by @axunonb in #209
  • TypeContext.Deserialize/.Serialize: options may be null by @axunonb in #210
  • Bump version 4.0.0-pre.1 by @axunonb in #211

New Contributors