Switching params to data for posting json structure.