JSON Parsing issue in Rails -
i seeing strange issue in rails.
request body (request.body):
renewals[][driver_1][dl_number]=123& renewals[][driver_1][expiration_date]=20130513& renewals[][driver_1][last_name]=123& renewals[][driver_1][state]=al& renewals[][driver_1][verified]=1& renewals[][driver_2][verified]=0& renewals[][id]=6415& renewals[][insurance][expiration_date]=20130513& renewals[][insurance][naic]=123& renewals[][insurance][policy_number]=123& renewals[][insurance][verified]=1& renewals[][mailing_address][address_has_changed]=0& renewals[][mailing_address][city]=gulf%20shores& renewals[][mailing_address][state]=al& renewals[][mailing_address][street_address]=8094%20beach%20lane& renewals[][mailing_address][zip]=35023& renewals[][driver_1][dl_number]=123& renewals[][driver_1][last_name]=123& renewals[][driver_1][state]=al& renewals[][driver_1][verified]=1& renewals[][driver_2][verified]=0& renewals[][id]=6412& renewals[][insurance][expiration_date]=20130513& renewals[][insurance][naic]=123& renewals[][insurance][policy_number]=123& renewals[][insurance][verified]=1& renewals[][mailing_address][address_has_changed]=0& renewals[][mailing_address][city]=hueytown& renewals[][mailing_address][state]=al& renewals[][mailing_address][street_address]=123%20any%20lane& renewals[][mailing_address][zip]=35023& renewals[][driver_1][dl_number]=123& renewals[][driver_1][last_name]=123& renewals[][driver_1][state]=al& renewals[][driver_1][verified]=1& renewals[][driver_2][verified]=0& renewals[][id]=6411& renewals[][insurance][expiration_date]=20130513& renewals[][insurance][naic]=123& renewals[][insurance][policy_number]=123& renewals[][insurance][verified]=1& renewals[][mailing_address][address_has_changed]=0& renewals[][mailing_address][city]=hueytown& renewals[][mailing_address][state]=al& renewals[][mailing_address][street_address]=104%20merrimont%20road& renewals[][mailing_address][zip]=35023&
json parsed params (params[:renewals]): https://gist.github.com/t2/5566652
notice in json driver_1 information missing on last record. not sure why is. data in request. known bug missing? let me know if need more info.
unfortunately how rails parses json (where []
massively nested). i've come against before - http://guides.rubyonrails.org/form_helpers.html#combining-them gave explanation.
from remember, if can put in numeric keys rather []
(i.e. [1]
first one, [2]
second etc.) work want to.
Comments
Post a Comment