Fix json params parsing regression for non-object JSON content.

Fixes #8845.
Merge pull request #8855 from dylanahsmith/parse-non-object-json-params

Fix json params parsing regression for non-object JSON content.