Releases: khanhnd157/SerializationXml
Releases · khanhnd157/SerializationXml
v2.1.0
MazeNET.SerializationXml v2.1.0
Breaking Changes:
- Namespace restructured: Core.Interfaces → Abstractions, Core.Exceptions → Exceptions,
Core.Options → Options, Infrastructure.Converters → Services - XmlExtensions renamed to XmlDocumentExtensions (namespace moved to root)
- IXmlToJsonConverter split into 3 interfaces (see below)
New Features:
- XML-to-Object mapping: XmlToObject(), .ToObject() — map XML to typed object,
unmatched properties remain null/default - Typed JSON conversion: XmlToJson(), .ToJson() — XML → T → JSON with only T's properties
- XML-to-JSON conversion: built-in zero-dependency engine (no Newtonsoft.Json or System.Text.Json)
- Async support: SaveToFileAsync, FileToObjectAsync, LoadXmlAsync,
SerializeAsync, DeserializeAsync with CancellationToken - Custom exception: XmlSerializationException with TargetType and Operation context
- DI extension: IServiceCollection.AddSerializationXml() registers 5 services
Architecture Improvements:
- SRP: IXmlToJsonConverter split into IXmlToJsonConverter (6 methods),
IXmlToObjectMapper (3 methods), IXmlTypedJsonConverter (3 methods) - Flat project structure: max 2 levels deep (Abstractions/, Services/, Options/, etc.)
- 5 focused services: XmlSerializerService, XmlFileOperationsService,
XmlToJsonConverterService, XmlToObjectMapperService, XmlTypedJsonConverterService
Bug Fixes:
- Fixed XmlDocument.Save() incorrectly serializing string instead of document
- Fixed throw ex losing stack trace — replaced with custom exception wrapping
- Added missing null checks across all public methods
- Removed redundant Close()/Dispose() inside using blocks
- Removed code duplication from #if NET9_0_OR_GREATER directives
Other:
- Removed duplicate Logo.ico at project root
- Simplified ReadByteArrayFormStream with Stream.CopyTo
- Renamed PreFix → Prefix
- Fixed csproj: consolidated WarningLevel, corrected RepositoryType to git
- Nullable reference types enabled globally
What's Changed
- Develop by @khanhnd157 in #3
- Develop by @khanhnd157 in #4
Full Changelog: 2.0.2...v2.1.0
What's Changed
- Develop by @khanhnd157 in #3
- Develop by @khanhnd157 in #4
Full Changelog: 2.0.2...v2.1.0
v2.0.2
What's Changed
- Update support net48 net8.0 net9.0 net10.0 netstandard2.0 netstandard2.1 by @khanhnd157 in #2
Full Changelog: 2.0.0...2.0.2
What's Changed
- Update support net48 net8.0 net9.0 net10.0 netstandard2.0 netstandard2.1 by @khanhnd157 in #2
Full Changelog: 2.0.0...2.0.2
v2.0.0
Restructure to Clean Architecture and update namespace to MazeNET.SerializationXml
BREAKING CHANGES:
- Namespace changed from
CodeMazeNET.Serialization.XmltoMazeNET.SerializationXml - Package ID changed to
MazeNET.SerializationXml
Features:
- Implement
Clean Architecturewith Core and Infrastructure layers - Add interface-based design (
IXmlSerializer,IXmlFileOperations,IXmlDocumentConverter) - Add multi-targeting support for
.NET Framework 4.8,.NET 9.0, and.NET 10.0 - Add dependency injection support
- Enable nullable reference types for
.NET 9+ - Add comprehensive XML documentation comments
Improvements:
- Better error handling with
ArgumentNullException.ThrowIfNullforModern .NET - Apply
SOLIDprinciples throughout codebase - Add
XmlConverterfacade for backward compatibility - Organize code into Core/Interfaces, Core/Options, and Infrastructure layers
Documentation:
- Add
EXAMPLES.mdwith real-world usage examples - Update
README.mdwith new namespace and features
Fixes:
- Fix nullable reference type warnings
- Fix potential null dereference issues
- Improve stream and resource management