Fix JSON requests which have no body

The changes to the JsonClient led to an issue where an empty params
payload would be sent as a literal "null". This fixes the behaviour.