kazeburo / Kossy

sinatra-ish simple waf
Other
35 stars 13 forks source link

Enhance Kossy::Request to support array values in JSON body parameters #19

Closed kfly8 closed 1 year ago

kfly8 commented 1 year ago

This pull request improves the handling of JSON body array values in Kossy::Request.

The Kossy::Request module failed to handle JSON body parameters such as an array like ["hello", "world”]. The following test code reproduces this problem: t/100_bugs/001_array_value_parameters_in_json_body.t

To solve this problem, this pull request changed to use $self->body_parameters_raw->flatten instead of @{$self->_body_parameters} when decoding JSON body parameters.