We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If an element is CamelCased, its content always evaluates to nil:
nil
pry(main)> foo = HappyMapper.parse("<foo><MessageId>f3a16e4c-b812-4934-a009-742ac51668b5</MessageId></foo>") => #<#<Class:0x00000002945e60>:0x000000029448d0 @message_id=nil> pry(main)> foo.message_id => nil
Renaming the elements to lowercase yields correct content but since my input will always be camelcased, that's not an option.
The text was updated successfully, but these errors were encountered:
If you need a work around until this is fixed: explicitly set the tag name:
class Foo include HappyMapper tag 'foo' has_one :message_id, String, tag: 'MessageId' end Foo.parse "<foo><MessageId>f3a16e4c-b812-4934-a009-742ac51668b5</MessageId></foo>" #=> <Foo:0x007fc774211798 @message_id="f3a16e4c-b812-4934-a009-742ac51668b5">
Sorry, something went wrong.
Thanks you for the hint. I had hoped to not need classes for every case, but I'll give it a try!
No branches or pull requests
If an element is CamelCased, its content always evaluates to
nil
:Renaming the elements to lowercase yields correct content but since my input will always be camelcased, that's not an option.
The text was updated successfully, but these errors were encountered: