Skip to content

Incorrect parsing for arrays #43

Open

Description

@mecampbellsoup

Hi guys,

I am parsing a querystring that includes an array value. However this library is interpreting it as a hash with a key of ''.

   # intended to be parsed as follows (note this is a Ruby hash)
   "received_on"=>"2012-09-07",
   "invoice_uids"=>["inv_9hchn3xc84mgm"],
   "invoice_id"=>nil

Here is the raw querystring:

payload[transaction][received_on]=2012-09-07&payload[transaction][invoice_uids][]=inv_9hchn3xc84mgm&payload[transaction][invoice_id]=

And here is the output from parsing using this library:

        'received_on': '2012-09-07',
        'invoice_uids': {'': 'inv_9hchn3xc84mgm'},
        'invoice_id': ''

Activity

  1. Martini002 commented on Aug 2, 2023

    @Martini002

    same here, did you figure it out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions