Can't send JSON code using uri module

I am trying to send a JSON payload using uri module through body parameter. The variables {{ network-name }} and and {{ IP1 }} are imported from config.yml.

I have defined body in vars. The json code which I am trying to print is getting created properly using (debug: var={{ body | to_json}}). But, the output which I am redirecting to the dest file is showing errors. What could be the reason that the JSON payload is not getting sent at the destination url.

Here’s the ansible playbook: