Skip to content

Releases: khanhnd157/SerializationXml

v2.1.0

06 Feb 08:21
19ae276

Choose a tag to compare

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

Full Changelog: 2.0.2...v2.1.0

What's Changed

Full Changelog: 2.0.2...v2.1.0

v2.0.2

30 Dec 06:51
48a8d01

Choose a tag to compare

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

06 Dec 16:48
2894441

Choose a tag to compare

v2.0.0 Pre-release
Pre-release

Restructure to Clean Architecture and update namespace to MazeNET.SerializationXml

BREAKING CHANGES:

  • Namespace changed from CodeMazeNET.Serialization.Xml to MazeNET.SerializationXml
  • Package ID changed to MazeNET.SerializationXml

Features:

  • Implement Clean Architecture with 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.ThrowIfNull for Modern .NET
  • Apply SOLID principles throughout codebase
  • Add XmlConverter facade for backward compatibility
  • Organize code into Core/Interfaces, Core/Options, and Infrastructure layers

Documentation:

  • Add EXAMPLES.md with real-world usage examples
  • Update README.md with new namespace and features

Fixes:

  • Fix nullable reference type warnings
  • Fix potential null dereference issues
  • Improve stream and resource management