v4.0.0-pre.1
Pre-release
Pre-release
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