-
Notifications
You must be signed in to change notification settings - Fork 2
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
to_xml Method Behavior is Inconsistent #204
Comments
@0arm0 can you provide more information on how As you know I don't know on top of my head whether is a valid use case to apply serialization methods to classes directly. (Probably?) |
@ronaldtse here is how I am using |
@0arm0 I would suggest not using |
The to_xml method in the Atmospheric::Export::Iso25331975::GroupBase class exhibits inconsistent behavior. The following scenarios were tested:
Calling the Class Method to_xml with an Object:
Calling the Instance Method to_xml:
Atmospheric::Export::Iso25331975::GroupBase.new.to_xml
Result: Returns nil.
This behavior is unexpected because the instance method to_xml should ideally provide serialized XML output for the object's data. However, it returns nil, while the class method returns an arbitrary XML string ("").
Steps to Reproduce:
Create an instance of GroupBase:
obj = Atmospheric::Export::Iso25331975::GroupBase.new
Test the class method to_xml:
Atmospheric::Export::Iso25331975::GroupBase.to_xml(obj)
Test the instance method to_xml:
Atmospheric::Export::Iso25331975::GroupBase.new.to_xml
Expected Behavior:
The to_xml method (either class or instance) should return consistent XML serialization for the object's data.
If the to_xml method is not fully implemented, it should raise an appropriate error or return a meaningful placeholder, not nil.
Actual Behavior:
The instance method to_xml returns nil.
The class method to_xml returns a static placeholder XML ("").
The text was updated successfully, but these errors were encountered: