Skip to content

Releases: YAXLib/YAXLib

v4.2.2

20 May 07:56
db9fd41
Compare
Choose a tag to compare

What's Changed

  • Fix: Returning a StringBuilder exceeding default capacity to StringBuilderPool #249 (thanks to @stumpy1029 for the bug report)

Full Changelog: v4.2.1...v4.2.2

v4.2.1

01 Apr 09:00
3c7353d
Compare
Choose a tag to compare

What's Changed

  • Correct filtering for properties that are part of the .NET framework, when the runtime framework is not the same as the YAXLib target framework (e.g. reference to NetStandard2.0 from NET481). Closes #246
  • Update NuGet api key in #245
  • Update unit test packages
  • Convert NUnit Classic Assert to the Constraint model
  • Add package reference NUnit.Analyzers
  • Bump version to v4.2.1 #247

Full Changelog: v4.2.0...v4.2.1

v4.2.0

07 Aug 19:04
19b6d61
Compare
Choose a tag to compare

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 & ThreadLocal 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: v4.1.0...v4.2.0

v4.1.0

28 Jun 07:30
6c0e4b1
Compare
Choose a tag to compare

What's Changed

  1. Add DateOnly and TimeOnlyas KnownTypes that can be serialized and deserialized in #224

  2. Add NET6.0 as a target framework in in #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 #224

  4. Miscellaneous

  • chore: Don't run build/test workflows for markdown file changes in #220
  • fix: Pass a timeout to limit the RegEx execution time in #221
  • Update NuGet API Key in appveyor.yml in #222

Full Changelog: v4.0.0...v4.1.0

v4.0.0

30 Oct 17:03
5b13845
Compare
Choose a tag to compare

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

  • 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
  • Bump version 4.0.0

New Contributors

v4.0.0-pre.1

16 Sep 21:56
445bcdb
Compare
Choose a tag to compare
v4.0.0-pre.1 Pre-release
Pre-release

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

v3.0.1

22 Sep 15:26
8af554e
Compare
Choose a tag to compare

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.0

02 Aug 20:13
85c7b21
Compare
Choose a tag to compare

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