3-1-stable: Fix JSON params parsing regression for non-object JSON content.

Backports #8855.