YAXLib Versions Save

Yet Another XML Serialization Library for the .NET Framework and .NET Core

v4.2.1

3 weeks ago

What's Changed

Full Changelog: https://github.com/YAXLib/YAXLib/compare/v4.2.0...v4.2.1

v4.2.0

8 months ago

What's Changed

  1. Add the DoNotSerializeDefaultValues option to YAXSerializationOptions.
  2. Add the TypeInspector property to SerializerOptions.
  3. Mark PropertyInfo, FieldInfo, and MemberInfo properties as obsolete in IMemberContext.
  4. Add the MemberDescriptor property to IMemberContext as a replacement for deprecated properties.
  5. Miscellaneous:
    • Update MemberWrapperCache and UdtWrapperCache: cache the type by type and SerializerOptions.
    • Remove usage of Lazy<T> & ThreadLocal<T> as they complicate using serializer in Debug mode "The function evaluation requires all threads to run".
    • Implement C# 11 Raw String Interpolation for YAXLibTests

Many thanks to @ycherkes for the great job in creating this version (first contribution)

Full Changelog: https://github.com/YAXLib/YAXLib/compare/v4.1.0...v4.2.0

v4.1.0

9 months ago

What's Changed

  1. Add DateOnly and TimeOnlyas KnownTypes that can be serialized and deserialized in https://github.com/YAXLib/YAXLib/pull/224

  2. Add NET6.0 as a target framework in in https://github.com/YAXLib/YAXLib/pull/224. No dependencies for NET6.0

  3. Add reference to Portable.System.DateTimeOnly v7.0.1 (Project https://github.com/OlegRa/System.DateTimeOnly supports DateOnly and TimeOnly types for NetStandard2.x and .NET Framework 4.6.x) in in https://github.com/YAXLib/YAXLib/pull/224

  4. Miscellaneous

Full Changelog: https://github.com/YAXLib/YAXLib/compare/v4.0.0...v4.1.0

v4.0.0

1 year ago

Release Notes v4.0.0

Despite the breaking changes the effort for migrating a previous version to the current one is usually quite low.

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

New Contributors

v4.0.0-pre.1

1 year ago

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

New Contributors

v3.0.1

2 years ago

Changes from v3.0.0:

The UdtWrapper now initializes the UnderlyingType property with the underlying type of the udtType, if it is nullable.

Corrected unit tests in YAXLibTests/SerializationTest.cs:

  • NullableSample2Test()
  • NullableSample2WithNullAttributeTest()

Added De/Serialilzation test for fields.

v3.0

2 years ago

Changes:

  • Fix: Exceptions can now be serialized properly, resolving #22 and #62 (#152)
  • Fix: YAXSerializer leaves SerializerOptions.MaxRecursion (and obsolete YAXSerializer.MaxRecursion unchanged (#154)
  • Serialization and de-serialization can be culture-specific (#80, #139)
    • Fully compatible with v2.x (using CultureInfo.InvariantCulture as the default setting)
    • Limitation: Serialization and de-serialization must use the same culture setting
  • Fix YAXAttributeForClass and YAXValueForClass attributes are ignored when a YAXCustomSerializer is not an attribute for the property, but on the property's type (#143, #97)
  • Introduced SerializerOptions for instanciating YAXSerializer (#137). Marked 2.x constructors as obsolete (will be removed in v4)
  • Removed Microsoft.DotNet.PlatformAbstractions dependency (#127)
  • Enabled SourceLink and Deterministic Build (#125)
  • Now supporting .NET Standard 2.0+ and .NET 4.6.1+ (#124)
  • Added cross-framework compatibility between .NET Framework 2.x-4.x and .NET Standard (#123)
  • Ingrated fork YAXLib.Redux (#122)
  • SemVer versioning

Breaking changes:

  • Booleans are serialized as ToLowerInvariant(), see the docs here. De-serialization is backward compatible. (#78)
  • ICustomDeserializer has been removed. It was not used in YAXLib (#150)
  • Corrected typos (UdtWrapper.YAXSerializer.DimentionsAttributeName -> YAXSerializer.DimensionsAttributeName) (#135)
  • Corrected typos (UdtWrapper.IsNotAllowdNullObjectSerialization -> UdtWrapper.IsNotAllowedNullObjectSerialization, UdtWrapper.DontSerializePropertiesWithNoSetter -> UdtWrapper.DoNotSerializePropertiesWithNoSetter) (#144)
  • Dropped support of netstandard1.6