wojtpl2 - ExtendedXmlSerializer 2.1.25

Extended Xml Serializer for .NET

PM> Install-Package ExtendedXmlSerializer -Version 2.1.25 -Source https://www.myget.org/F/wojtpl2/api/v3/index.json

Copy to clipboard

> nuget.exe install ExtendedXmlSerializer -Version 2.1.25 -Source https://www.myget.org/F/wojtpl2/api/v3/index.json

Copy to clipboard

> dotnet add package ExtendedXmlSerializer --version 2.1.25 --source https://www.myget.org/F/wojtpl2/api/v3/index.json

Copy to clipboard
<PackageReference Include="ExtendedXmlSerializer" Version="2.1.25" />
Copy to clipboard
source https://www.myget.org/F/wojtpl2/api/v3/index.json

nuget ExtendedXmlSerializer  ~> 2.1.25
Copy to clipboard

> choco install ExtendedXmlSerializer --version 2.1.25 --source https://www.myget.org/F/wojtpl2/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "wojtpl2" -SourceLocation "https://www.myget.org/F/wojtpl2/api/v2"
Install-Module -Name "ExtendedXmlSerializer" -RequiredVersion "2.1.25" -Repository "wojtpl2" 
Copy to clipboard

ExtendedXmlSerializer

Build status Nuget

Welcome!

Welcome to ExtendedXMLSerializer's GitHub repository. Here you will find a .NET serializer that:

  • Specializes in POCO-based object graph serialization
  • Features a powerful extension model
  • Operates in the tried-and-trusted dependable XML format. πŸ’–

"But why?"

The classic System.Xml.XmlSerializer poses some challenges:

  • Does not support properties that are defined with interface types
  • Does not support read-only collection properties (like Xaml does)
  • Does not support parameterized constructors (immutable objects)
  • Does not support private constructors
  • Does not support serialization of class with circular reference or class with interface property
  • If you want create custom serializer, your class must inherit from IXmlSerializable or ISerializable. This takes the "plain" out of POCO. 😁
  • No migration mechanism for XML based on older code model

ExtendedXmlSerializer addresses a lot of these problems and much much more!

  • Serializes and deserializes pretty much any POCO you throw at it*: class, struct, generics, primitives, generic List and Dictionary, Array, Enum and much much more! If you find a class that doesn't get serialized, let us know and we'll take a look at it.
  • Custom serializer registration by type or member
  • Serialization of references, handling circular references without endlessly looping
  • All configurations (migrations, custom serializer...) are outside the class and not coupled to attributes or messy, arcane conventions
  • Migrate old XML based on an older schema to a current schema
  • Property encryption
  • Support XmlElementAttribute, XmlRootAttribute, and XmlTypeAttribute for identity resolution
  • Additional attribute support: XmlIgnoreAttribute, XmlAttributeAttribute, and XmlEnumAttribute
  • Deserialization xml from classic XmlSerializer (mostly, details in FAQ)

(*Yes, this even -- and especially -- means classes with properties that have an interface property type!)

Supported platforms:

Usage

ExtendedXmlSerializer uses a ConfigurationContainer to store configurations and extensions. Once this container is configured as desired, call its Create method to create a serializer and serialize!

Example class:

class Subject {
    public int Number { get; set; }
    public string Message { get; set; }
}

Configure, create, and serialize:

IExtendedXmlSerializer serializer = new ConfigurationContainer().UseAutoFormatting()
                                                                .UseOptimizedNamespaces()
                                                                .EnableImplicitTyping(typeof(Subject))
                                                                // Additional configurations...
                                                                .Create();

var instance = new Subject {Message = "Hello World!", Number = 42};
var document = serializer.Serialize(new XmlWriterSettings {Indent = true},
                                    instance);

MAKE THE PRETTY XML!!! 😁😁😁

(contents of the document variable above:)

<?xml version="1.0" encoding="utf-8"?>
<Subject Number="42" Message="Hello World!" />

The above demonstrated code can be found in the form of a passing test within our test suite here.

Installation

From your favorite Package Manager Console:

Install-Package ExtendedXmlSerializer

Or if you are brave and want to try out our preview feed:

Install-Package ExtendedXmlSerializer -Source https://ci.appveyor.com/nuget/extendedxmlserializer-preview

Known Issues

While ExtendedXmlSerializer is very nice, it does have some known issues that have been identified by its owners. These issues are considered too significant to address and have been consolidated under a dedicated label for your review here:

https://github.com/ExtendedXmlSerializer/home/labels/known%20issue

Please review these issues before submitting a new issue and/or trialing ExtendedXmlSerializer.

Additionally, please note that ExtendedXmlSerializer is now essentially in maintenance mode as of March 2020. We will continue to monitor for any major bugs, so feel free to post an issue if you find one. However, major tasks and/or feature requests and the like will be deferred to the community.

Featured Documentation

(Looking to upgrade from 1.x? We got you covered here.)

Want to Contribute?

We are a smaller project and are open to any contributions or questions. We do not have a formal code of conduct and would like to keep it that way.

Keep Calm and Code

If you view our FAQs and still have a question, open up a new issue! We'll do our best to meet you there with sample code to help get you on your way.

Notable Contributors

Mentions

ExtendedXmlSerializer is proudly developed and maintained with ReSharper Ultimate.


Features addressed in this release (where applicable): https://github.com/WojciechNagorski/ExtendedXmlSerializer/issues?q=is:issue+sort:updated-desc+milestone:2.1.25+label:enhancement

Bugs addressed in this release: https://github.com/WojciechNagorski/ExtendedXmlSerializer/issues?q=is:issue+sort:updated-desc+milestone:2.1.25+label:bug

To create a new discussion around this release, please feel free to comment on one of the above issues, or visit: https://github.com/WojciechNagorski/ExtendedXmlSerializer/issues/new?milestone=2.1.25&labels=discussion

If you would like to report a new issue altogether, please do so here: https://github.com/WojciechNagorski/ExtendedXmlSerializer/issues/new?labels=bug

Or if you have a question and/or would like to discuss a topic around ExtendedXmlSerializer: https://github.com/WojciechNagorski/ExtendedXmlSerializer/issues/new?labels=question

  • .NETFramework 4.5
    • System.Collections.Immutable (>= 1.6.0)
    • System.Interactive (>= 4.0.0)
    • System.Reflection.Emit.Lightweight (>= 4.6.0)
  • .NETStandard 2.0
    • System.Collections.Immutable (>= 1.6.0)
    • System.Interactive (>= 4.0.0)
    • System.Reflection.Emit.Lightweight (>= 4.6.0)
  • .NETFramework 4.5: 4.5.0.0
  • .NETStandard 2.0: 2.0.0.0

Owners

wojtpl2

Authors

Wojciech Nagórski, Michael DeMond

Project URL

https://github.com/WojciechNagorski/ExtendedXmlSerializer

License

MIT

Tags

xmlserializer xmlserialization serialization ExtendedXmlSerializer xml

Info

66 total downloads
2 downloads for version 2.1.25
Download (692.97 KB)
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
2.1.25 692.97 KB Fri, 08 Nov 2019 16:49:50 GMT 2
2.1.24 690.72 KB Fri, 08 Nov 2019 15:43:52 GMT 3
2.1.23 684.22 KB Fri, 27 Sep 2019 13:45:52 GMT 2
2.1.22 686.52 KB Wed, 25 Sep 2019 14:52:04 GMT 2
2.1.21 681.81 KB Wed, 17 Jul 2019 07:05:47 GMT 2
2.1.20 681.22 KB Mon, 08 Jul 2019 10:52:13 GMT 1
2.1.19 677.99 KB Wed, 19 Jun 2019 18:38:57 GMT 1
2.1.18 677.73 KB Mon, 13 May 2019 13:54:56 GMT 1
2.1.17 658.61 KB Tue, 12 Mar 2019 18:24:42 GMT 1
2.1.16 657.17 KB Wed, 13 Feb 2019 06:21:53 GMT 2
2.1.15 651.79 KB Tue, 08 Jan 2019 12:11:19 GMT 2
2.1.14 651.61 KB Sat, 24 Nov 2018 07:25:31 GMT 1
2.1.13 442.45 KB Fri, 26 Oct 2018 07:19:37 GMT 1
2.1.12 440.98 KB Wed, 17 Oct 2018 04:22:13 GMT 1
2.1.11 440.98 KB Tue, 16 Oct 2018 06:46:43 GMT 6
2.1.10 438.45 KB Mon, 08 Oct 2018 15:59:28 GMT 3
2.1.9 438.42 KB Wed, 03 Oct 2018 19:32:18 GMT 2
2.1.8 438.33 KB Thu, 20 Sep 2018 14:10:37 GMT 4
2.1.7 436.77 KB Thu, 13 Sep 2018 17:12:52 GMT 2
2.1.6 436.77 KB Mon, 10 Sep 2018 18:07:14 GMT 2
2.1.5 436.48 KB Wed, 29 Aug 2018 14:05:46 GMT 1
2.1.3 434.65 KB Sat, 25 Aug 2018 08:13:36 GMT 1
2.1.2 427.73 KB Tue, 17 Apr 2018 06:24:11 GMT 1
2.1.1 405.27 KB Sun, 04 Feb 2018 23:27:57 GMT 2
2.1.0 402.18 KB Thu, 01 Feb 2018 10:56:28 GMT 1
2.0.1 402.51 KB Wed, 31 Jan 2018 07:55:23 GMT 2
2.0.0 196.02 KB Fri, 26 Jan 2018 14:47:18 GMT 2
2.0.0-alpha7 383.93 KB Tue, 14 Nov 2017 12:40:22 GMT 1
2.0.0-alpha6 380.87 KB Tue, 03 Oct 2017 15:54:07 GMT 1
2.0.0-alpha5 375.01 KB Wed, 30 Aug 2017 07:51:55 GMT 1
2.0.0-alpha4 373.19 KB Thu, 10 Aug 2017 16:05:48 GMT 1
2.0.0-alpha3 370.02 KB Wed, 19 Apr 2017 10:41:06 GMT 2
2.0.0-alpha 370 KB Tue, 11 Apr 2017 09:16:21 GMT 2
1.5.0 32.15 KB Mon, 27 Feb 2017 14:48:41 GMT 2
1.4.1 32.15 KB Tue, 06 Dec 2016 08:22:13 GMT 1
1.4.0 28.57 KB Fri, 18 Nov 2016 09:33:11 GMT 1
1.3.0 27.32 KB Tue, 18 Oct 2016 08:19:47 GMT 1
1.2.0 27.31 KB Tue, 18 Oct 2016 07:11:21 GMT 1
1.1.1 25.42 KB Thu, 22 Sep 2016 11:56:57 GMT 1
1.1.0 24.07 KB Wed, 14 Sep 2016 11:46:16 GMT 0
1.0.1 24.08 KB Wed, 31 Aug 2016 07:18:45 GMT 0
1.0.0 23.95 KB Tue, 30 Aug 2016 13:15:47 GMT 0