Releases: YAXLib/YAXLib
v4.2.2
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
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
What's Changed
- Add the DoNotSerializeDefaultValues option to YAXSerializationOptions.
- Add the TypeInspector property to SerializerOptions.
- Mark PropertyInfo, FieldInfo, and MemberInfo properties as obsolete in IMemberContext.
- Add the MemberDescriptor property to IMemberContext as a replacement for deprecated properties.
- 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
What's Changed
-
Add
DateOnly
andTimeOnly
asKnownType
s that can be serialized and deserialized in #224 -
Add NET6.0 as a target framework in in #224. No dependencies for NET6.0
-
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
-
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
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
ICustomSerializer
s andIKnownType
s withISerializationContext
as additional parameter. - For
ICustomSerializer
s andIKnownType
s a single instance is used for all invokations (instead of one instance per invokation) YAXSerializationOptions
now have flagNone = 0
.SerializeNullObjects
is still the default, and is set in the CTOR ofYAXSerializer
.- 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
IKnownType
s can be dynamically added and removed.WellKnownTypes
arepublic
now. ISerializationContext
containsITypeContext
,IMemberContext?
,SerializerOptions
,RecursionCount
for a better implementation experience ofICustomSerializer
s andIKnownType
s. Block recursive calls toICustomSerializer
s andIKnownType
s.ITypeContext
offers methods- to de/serialize the current type. This leaves the heavy lifting to the
IYAXSerializer
. GetFieldsForSerialization()
andGetFieldsForDeserialization()
to get fields identified byIYaxSerializer
.
- to de/serialize the current type. This leaves the heavy lifting to the
ICustomSerializer
s can be also be invoked using aprivate
constructorException
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
- @OrbintSoft made their first contribution in #170
Full Changelog: v3.0.1...v4.0.0
v4.0.0-pre.1
Release Notes v4.0.0-pre.1
Breaking changes
- Invoke
ICustomSerializer
s andIKnownType
s withISerializationContext
as additional parameter. - For
ICustomSerializer
s andIKnownType
s a single instance is used for all invokations (instead of one instance per invokation) YAXSerializationOptions
now have flagNone = 0
.SerializeNullObjects
is still the default, and is set in the CTOR ofYAXSerializer
.- 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
IKnownType
s can be dynamically added and removed.WellKnownTypes
arepublic
now. ISerializationContext
containsITypeContext
,IMemberContext?
,SerializerOptions
,RecursionCount
for a better implementation experience ofICustomSerializer
s andIKnownType
s. Block recursive calls toICustomSerializer
s andIKnownType
s.ITypeContext
offers methods- to de/serialize the current type. This leaves the heavy lifting to the
IYAXSerializer
. GetFieldsForSerialization()
andGetFieldsForDeserialization()
to get fields identified byIYaxSerializer
.
- to de/serialize the current type. This leaves the heavy lifting to the
ICustomSerializer
s can be also be invoked using aprivate
constructorException
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
- @OrbintSoft made their first contribution in #170
Full Changelog: v3.0.1...v4.0.0-pre.1
v3.0.1
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
Changes:
- Fix:
Exception
s can now be serialized properly, resolving #22 and #62 (#152) - Fix:
YAXSerializer
leavesSerializerOptions.MaxRecursion
(and obsoleteYAXSerializer.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
andYAXValueForClass
attributes are ignored when aYAXCustomSerializer
is not an attribute for the property, but on the property's type (#143, #97) - Introduced
SerializerOptions
for instanciatingYAXSerializer
(#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 inYAXLib
(#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