Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataContractJsonSerializer uses default schema when serializing OutboxRecord and used suffix k__BackingField #648

Open
ramonsmits opened this issue Sep 3, 2021 · 0 comments

Comments

@ramonsmits
Copy link
Member

ramonsmits commented Sep 3, 2021

DataContractJsonSerializer uses default schema when serializing OutboxRecord

This results in weird field names that are similar to <Headers>k__BackingField instead of a good schema name that would use the name Headers

[
    {
        "<Headers>k__BackingField": {
            "NServiceBus.MessageId": "860c26ec-d400-49ec-a73c-ad9800cf8d1c",
            "NServiceBus.MessageIntent": "Send",
            "NServiceBus.RelatedTo": "50f4ed5f-67dc-4655-a7ad-ad9800cce246",
            "NServiceBus.ConversationId": "72647d2c-56a0-44a3-8978-ad9800cce248",
            "NServiceBus.CorrelationId": "50f4ed5f-67dc-4655-a7ad-ad9800cce246",
            "NServiceBus.ReplyToAddress": "HeadersContainSpecialCharacters.OutboxEndpoint",
            "NServiceBus.OriginatingMachine": "ZOLDER",
            "NServiceBus.OriginatingEndpoint": "HeadersContainSpecialCharacters.OutboxEndpoint",
            "$.diagnostics.originating.hostid": "ef7f782c7b29ad3e524a28b0fcf0340b",
            "NServiceBus.ContentType": "text\/xml",
            "NServiceBus.EnclosedMessageTypes": "NServiceBus.AcceptanceTests.Outbox.When_headers_contain_special_characters+SendOrderAcknowledgement, NServiceBus.NHibernate.AcceptanceTests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
            "NServiceBus.Version": "8.0.0",
            "NServiceBus.TimeSent": "2021-09-03 12:35:40:257771 Z"
        },
        "<MessageId>k__BackingField": "860c26ec-d400-49ec-a73c-ad9800cf8d1c",
        "<Message>k__BackingField": [
            60,
            63,
            120,
            109,
            108,
            //---
       ],
        "<Options>k__BackingField": {
            "Destination": "HeadersContainSpecialCharacters.OutboxEndpoint"
        }
    }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant