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

Array of hash #672

Closed
TiteiKo opened this issue Mar 6, 2015 · 1 comment
Closed

Array of hash #672

TiteiKo opened this issue Mar 6, 2015 · 1 comment

Comments

@TiteiKo
Copy link
Contributor

TiteiKo commented Mar 6, 2015

Hello,

I'm having some trouble understanding an odd behaviour in Savon :

I have the following Hash of data :

{
  :request => {
    :info => {
      :players => [
      [0] {
        :player => {
          :id => 0,
          :player_type => 5,
          :details => {
            :external_id => 2
          }
        },
        [1] {
          :player => {
            :id => 1,
            :player_type => 2
          }
        }
      ]
    }
  }
}

The XML send in the request is the following (important stuff to see : not an array of player but an array of players)

<request>
  <info>
    <players>
      <player>
        <id>0</id>
        <playerType>5</playerType>
        <details>
          <externalId>2</externalId>
        </details>
      </player>
    </players>
    <players>
      <player>
        <id>1</id>
        <playerType>2</playerType>
      </player>
    </players>
  </info>
</request>

Although, I should have something more like this :

<request>
  <info>
    <players>
      <player>
        <id>0</id>
        <playerType>5</playerType>
        <details>
          <externalId>2</externalId>
        </details>
      </player>
      <player>
        <id>1</id>
        <playerType>2</playerType>
      </player>
    </players>
  </info>
</request>

It looks a bit like #585 but there's no answer there

@tjarratt
Copy link
Contributor

Closed by releasing Gyoku v1.2.3 -- thanks again @TiteiKo!

tjarratt added a commit that referenced this issue Mar 11, 2015
closes #672 add unwrap option and pass it to Gyoku
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants