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

XML Serialisation #637

Open
SmithPlatts opened this issue Sep 25, 2023 · 4 comments
Open

XML Serialisation #637

SmithPlatts opened this issue Sep 25, 2023 · 4 comments
Labels
enhancement Issues describing an enhancement or pull requests adding an enhancement.

Comments

@SmithPlatts
Copy link

Describe the feature

Hi;

Has anyone had any success serialising any of the POCO classes to XML? I've tried both XmlSerializer and DataContractSerializer, but they both freak out for different reasons.

Is there something simple I'm missing?

Schema objects

No response

@SmithPlatts SmithPlatts added the enhancement Issues describing an enhancement or pull requests adding an enhancement. label Sep 25, 2023
@Turnerj
Copy link
Collaborator

Turnerj commented Dec 23, 2023

Hey @SmithPlatts - haven't actually tried XML serialization before. I imagine it may have some trouble with our OneOrMany and Values types without some dedicated serializer for the,. If there are just some attributes we need to set on properties, that could be something easy enough for us to apply to the library though.

@SmithPlatts
Copy link
Author

Hi @Turnerj, cheers for opening the conversation.

I was actually thinking of giving that a go in my branch, and if it works without impacting the perf of the library, was going to open a PR for your review and comment.

@Turnerj
Copy link
Collaborator

Turnerj commented Dec 23, 2023

I don't imagine the existing performance of the library would be impacted - like if we just need extra attributes, that's effectively a no-op in terms of performance. If we need a new XML-based serializer, that's a bit more work and more tests to do it thoroughly. Really hoping we can get away with just some attributes etc to decorate properties!

@SmithPlatts
Copy link
Author

I've encountered circumstances where even attributes can change the compiler behaviour, and introduce a regression; not common, but I'm an overly defensive developer 😂

Happy to investigate the matter, and start with attributes. If a serialiser is also required, will be adding it test-first.

I'll let you know how things go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues describing an enhancement or pull requests adding an enhancement.
Projects
None yet
Development

No branches or pull requests

2 participants