GithubHelp home page GithubHelp logo

rafek1241 / rebus.serializer.xml Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 120 KB

XML serializer built on top of NewtonSoft.JSON for ReBus library

License: MIT License

C# 81.36% Batchfile 0.69% PowerShell 10.11% Shell 7.84%
rebus xml-serializer xml serializer extension

rebus.serializer.xml's Introduction

Robert Szachnowski's github stats

image

rebus.serializer.xml's People

Contributors

rafek1241 avatar

Watchers

 avatar  avatar

rebus.serializer.xml's Issues

Introduce type and namespace storage strategies

Give a possibility for the user to decide how namespace should be stored in a serialized message. Deserialization should remain the same and use all possibilities.

Possible strategies:

  • message headers (extensions)
  • XML root container attributes
  • Both

Fix BaseType order of attributes.

In NServiceBus deserialization order of xml attributes in root container is important.
Expected:

<Messages xmlns:xsi="..." xmlns:xsd="..." xmlns="..." xmlns:baseType="..." xmlns:baseType1="..">

Actual:

<Messages xmlns:baseType="..." xmlns:baseType1=".." xmlns:xsi="..." xmlns:xsd="..." xmlns="..." >

Create documentation for serializer

Create documentation for XML serialization package.

  • Describe how it works exactly, why newtonsoft.json is being used, and how it can be used?
  • Example scenarios.
  • Describe message headers that are set by serializer & possible options for XML serializer.
  • Unsupported section

Include base types in XML during serialization of message

Actual:

<RootContainer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/sometype">
....
</RootContainer>

Expected:

<RootContainer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/sometype" xmlns:baseType="NServiceBus.ICommand" xmlns:baseType1="NServiceBus.IMessage">
....
</RootContainer>

Explanation:

NServiceBus in older versions (I don't know how it works now) parsed XML objects to specific classes by using XML namespaces from their root container attributes. I want to have it to give a possibility for NServiceBus to read that messages.

Introduce fluent configuration

Currently, there is an options class that contains all settings and it is included in the extension method. It should be possible to set it up fluently by method chaining.

Current:

//rebus configuration
...
                   .Serialization(
                        r => r
                            .UseXmlSerializing(
                                logger,
                                new XmlSerializingOptions()
                                {
                                    IncludeNamespace = true,
                                    DefaultNamespacePrefix = "http://tempuri.net"
                                }
                            )
                    )

Expected:

                   .Serialization(
                        r => r
                            .UseXmlSerializing()
                                .WithLogger(logger)
                                .IncludeNamespace()
                                .WithNamespacePrefix("http://tempuri.net")
                    )

and

var config = new XmlSerializerConfig()
                                .WithLogger(logger)
                                .IncludeNamespace()
                                .WithNamespacePrefix("http://tempuri.net");

...
                   .Serialization(r=> r.UseXmlSerializing(config))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.