# Webhooks with decimal data

**URL:** <https://community.particle.io/t/webhooks-with-decimal-data/16574>\
**Category:** Troubleshooting\
**Created:** [October 15, 2015, 12:42pm UTC](https://community.particle.io/t/webhooks-with-decimal-data/16574 "2015-10-15T12:42:51Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![mhdevx](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/mhdevx/32/7047_2.png) [@mhdevx](https://community.particle.io/u/mhdevx)\
**Post date:** [October 15, 2015, 12:42pm UTC](https://community.particle.io/t/webhooks-with-decimal-data/16574/1 "2015-10-15T12:42:51Z")

</div>

Hi,

I created a Webhook to post data to [parse.com](http://parse.com). That works well except for one tiny detail: decimal numbers are converted to Strings. Is there a way to preserve the double or int type?

My event looks like the this:

```
{"name":"sensor","data":"{\"status\": 0, \"temp\": 10.46, \"pressure\": 1001.26, \"humidity\": 75.91, \"soil1\": 3290, \"soil2\": 3268, \"soil3\": 3294}","ttl":"60","published_at":"2015-10-15T12:35:08.693Z","coreid":"25002c000447343339373536"}

```

All the relevant data types of the JSON object are decimals, like status, temp, etc.  
The following Webhook is configured to post that data to [parse.com](http://parse.com):

```
{
    "eventName": "sensor",
    "deviceid": "25002c000447343339373536",
    "url": "https://api.parse.com/1/classes/Status",
    "requestType": "POST",
    "headers": {
        "X-Parse-Application-Id": "12345678",
        "X-Parse-REST-API-Key": "12345678",
        "Content-Type": "application/json"
    },
    "json": {
        "status": "{{status}}",
        "temperature": "{{temp}}",
        "pressure": "{{pressure}}",
        "humidity": "{{humidity}}",
        "soil1": "{{soil1}}",
        "soil2": "{{soil2}}",
        "soil3": "{{soil3}}",
        "coreid": "{{SPARK_CORE_ID}}"
    },
    "mydevices": true,
    "noDefaults": true
}

```

Technically that working well, I can see the data on the [parse.com](http://parse.com) dashboard. My only problem are the quotes, for the JSON data send, like:

```
"status": "{{status}}"

```

This results in status stored as string at [parse.com](http://parse.com) but I would like to store it as decimal.

```
"status": {{status}}

```

This (without the quotes) does not work. Creating the Webhook fails with the following error:

> tryParse error [SyntaxError: Unexpected token {]  
> Please check your .json file for syntax error.

Any idea how this can be solved?

Thx  
Markus

---

_[View the full topic](https://community.particle.io/t/webhooks-with-decimal-data/16574)._
