Formatting for Webhook

I am attempting to send webhooks to tago.io with location data. Tago is receiving the raw data but the format is not valid for what they are expecting.

Particle is sending

{
    "location": "{'lat':45.913062,'lng':-121.014963}",
    "value": "Wildwood",
    "variable": "location"
}

Tago.io is expecting

{
    "location": {"lat":45.913062,"lng":-121.014975},
    "value": "Wildwood",
    "variable": "location"
}

The difference is only the location and format of the quotes. I have not been able to figure out how to adjust these quotes in Particle. Everything I attempt gives me syntax errors.

the code in question:

snprintf(pubbuf, sizeof(pubbuf), "{'lat':%f,'lng':%f}", gps.location.lat(), gps.location.lng());

What syntax errors?
Have you tried "{\"lat\":%f, \"lng\":%f}" for the format string?
Also how have you got your webhook defined?

raw data back in tago.io

{
    "location": "{\"lat\":45.913075,\"lng\":-121.014938}",
    "value": "Wildwood",
    "variable": "location"
}

Try manually editing the JSON payload and removing the double quotes around {{{PARTICLE_EVENT_VALUE}}}

When I do that I get a syntax error from Particle

Where do you do it and what syntax error?

In that view you the double quotes around {{{PARTICLE_EVENT_VALUE}}} are required.

However, if your target server requires the contents of {{{PARICLE_EVENT_VALUE}}} to be “un-enquoted” you may need to use this
image