Fix the isse of parsing empty as array of [null] in json request

Now with the followind params:

  { people: [{name: 'angelo', posts:[] }] }

In a normal http post is decoded as:

  { :people => [{:name => 'angelo', :posts => []} ]}

while in json request is decoded as:

  { :people => [{:name => 'angelo', :posts => nil }] }

With this PR , json request and html have the same decoded params
fixes #11023