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

Add option to unwrap array of hashes #52

Merged
merged 1 commit into from
Mar 11, 2015
Merged

Conversation

TiteiKo
Copy link

@TiteiKo TiteiKo commented Mar 9, 2015

Hi

So, I was having a "small" issue with savon savonrb/savon#672 that was in fact a Gyoku issue, already discussed here : #48

Turns out, @stgwilli did quite an awesome job on that last november and (correct me if I'm wrong, but I did check), never pull requested it.

To make it simple, it allows array of hashes to be correctly formatted, without breaking any previous behaviour, as it is by adding an option (unwrap).

<items><item><name>foo</name></item></items><items><item><name>bar</name></item></items>
=>
<items><item><name>foo</name></item><item><name>bar</name></item></items>

It would be really nice to have this alternative, I'm pretty sure I'm not the only one who will have to switch to nokogiri otherwise (and that would pain me a great deal, as Gyoku is really great)

@tjarratt
Copy link
Contributor

Thanks for submitting this pull request @TiteiKo! I don't recall seeing any pull requests for this before, but November feels like it was ages ago at this point. I'm more than happy to merge this, since it all looks very reasonable, but I'm surprised this isn't the default behavior. SOAP is always very surprising, so I can imagine that maybe, at some point, someone needed an array of hashes to work this way.

tjarratt added a commit that referenced this pull request Mar 11, 2015
Add option to unwrap array of hashes
@tjarratt tjarratt merged commit e7ad03b into savonrb:master Mar 11, 2015
@tjarratt
Copy link
Contributor

Just released this as Gyoku v1.2.3 -- let me know if there's anything more I can do to help.

Dreadfully sorry that I never responded to your initial issue on Savon, but I'm very glad that you came back and contributed to the project!

johankok added a commit to johankok/gyoku that referenced this pull request Apr 22, 2015
mahemoff added a commit to mahemoff/gyoku that referenced this pull request Dec 24, 2015
Array serialization in Gyoku confused me until I discovered savonrb#52 and
looked at the test case. This doco should help. Note it doesn't document
the further enhancement in savonrb#54,  which is not yet merged.
mahemoff added a commit to mahemoff/gyoku that referenced this pull request Dec 24, 2015
Array serialization in Gyoku confused me until I discovered savonrb#52 and
looked at the test case. This doco should help. Note it doesn't document
the further enhancement in savonrb#54,  which is not yet merged.
mahemoff added a commit to mahemoff/gyoku that referenced this pull request Dec 24, 2015
Array serialization in Gyoku confused me until I discovered savonrb#52 and
looked at the test case. This doco should help. Note it doesn't document
the further enhancement in savonrb#54,  which is not yet merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants