-
Notifications
You must be signed in to change notification settings - Fork 47
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
Circular dependencies detection problem 2 #593
Comments
Wow @UladimirLameyko I am a little shocked here. It appears the reference is not detected at all. Thank you for reporting this I will look into it for you. 👍 |
OK @UladimirLameyko I did look into this and we're running into a bit of a limitation here with ExtendedXmlSerializer. Basically, it stems from the classic serializer and empty collections are not emitted. This is what you are running into here with the above code. In this case. if you are using references with collections it is recommended/suggested you initialize with an empty instance, as such:
I concede this is not perfect but poking around any further would introduce breaking changes and/or additional functionality I would not be comfortable introducing at this point with my limitations at the moment. That stated, I am definitely open to further discussion around this if you have further ideas/considerations/suggestions and even a PR if we can land on one. :) |
@Mike-E-angelo Problem not with empty arrays. Even if I put value into collection |
Oh I see... are you saying this is throwing a |
Branch issues/fix/i593 created! |
Alright @UladimirLameyko please try out the build as listed here: And let me know if that works for you. If so I will push this to NuGet. 👍 |
@Mike-E-angelo Look like it helps on my side. |
Great, sounds good @UladimirLameyko it has been deployed here: I appreciate your continued feedback and cooperation towards improving ExtendedXmlSerializer 👍
|
Continuation of #583
I have new case of same problem
Looks like this problem have more shades.
Problem found unexpectedly, previously we use .EnableReferences() but soon as we switched to .AllowMultipleReferences()
new problem is occured.
If I EnableReferences for same object it will serialize successfully, but will never use exs:reference="1"exs:identity="1"
I suppose this object should serialize with .AllowMultipleReferences only
Even Array.Empty will be detected as MultipleReferences
The text was updated successfully, but these errors were encountered: