savonrb / nori

XML to Hash translator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do not replace '-' with '_' in tag names.

radarek opened this issue · comments

Hello.

I'm trying to use savon library which use nori and I have one problem. Nori changes '-' to '_' in tag names. For example 'some-attribute' will be changed to 'some_attribute' (I want later to use response hash as argument for soap request). There is no option to change it. I would like to have option to not do it. I think it should be just removed becuase there is :convert_tags_to option for converting tags.

sounds good, and easy.
we could set the default :convert_tags_to to work like undasherize_keys. It will be breaking change for some people and will require version bump, but it would also solve this: #25

@rubiii how do you think?

This behavior is also problematic for us. We wanto to use nori to test XML responses which can contain tag names with dashes and underscores.

What do you think about introducing the option :convert_dashes_to_underscores.
It would be set to true by default to not break anybody currently depending on this behavior.

I created the pull request #58 to further discuss this issue.

Shout out to @JanAhrens for issuing the pull request that moved this issue further. I merged this today, but I'd love to know if there's anything more we can change that would help address the pain @radarek and @robuye felt a few months ago.

Would it be helpful to cut a new release of nori and put it on rubygems.org?