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

Fixes #8845.