# How could we use another format to do the payload?

**URL:** <https://community.cumulocity.com/t/how-could-we-use-another-format-to-do-the-payload/5384>\
**Category:** Forum\
**Tags:** device-connectivity, cumulocity\
**Created:** [July 13, 2021, 2:47pm UTC](https://community.cumulocity.com/t/how-could-we-use-another-format-to-do-the-payload/5384 "2021-07-13T14:47:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmaruyama](https://avatars.discourse-cdn.com/v4/letter/r/ee7513/32.png) [@rmaruyama](https://community.cumulocity.com/u/rmaruyama)\
**Post date:** [July 13, 2021, 2:47pm UTC](https://community.cumulocity.com/t/how-could-we-use-another-format-to-do-the-payload/5384/1 "2021-07-13T14:47:10Z")

</div>

Hello,  
We are trying to homologate a gateway and sensor from a manufacturer in Brazil. It was identified that the payload format is different from JSON and we would like to know how do we make Cumulocity read/convert this type of message, or if we have to use another way of reading please?  
Tks.

Example of the format of this manufacturer

 ![PayloadKhomp](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/a/7/a78af965ded950d1974311ddf0d2868c4ec20d9b.jpeg)

---

<div class="post-metadata">

**Author:** ![sagcskah](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/sagcskah/32/9972_2.png) [@sagcskah](https://community.cumulocity.com/u/sagcskah)\
**Post date:** [July 14, 2021, 8:21am UTC](https://community.cumulocity.com/t/how-could-we-use-another-format-to-do-the-payload/5384/2 "2021-07-14T08:21:26Z")

</div>

Hi rmaruyama,

looking at the structure the manufacturer provides I would guess his goal was to provide JSON but failed because the numbers provided are not enclosed in quotation marks. So before writing an interpreter I would reassure that what you posted is the real format he wants to send (would be the easiest solution if he simply missed the quotation marks for numbers).  
For dealing with the current format I see two possibilities: first would be to search for real numbers and surround them with quotation marks (e.g. by looking for q.m. between colon and closing bracket or comma?), being able after that to convert outcome from JSON to document (or to what you like), or write an interpreter that can handle this format.  
Interpreting the format would require to resolve each bracket level from top level down, and converting a list into stringlist and interpret the single item to a key/value pair, eliminating the quotation marks where present. From my point of view you would need a Java Service for this.

---

<div class="post-metadata">

**Author:** ![rmaruyama](https://avatars.discourse-cdn.com/v4/letter/r/ee7513/32.png) [@rmaruyama](https://community.cumulocity.com/u/rmaruyama)\
**Post date:** [July 14, 2021, 8:34pm UTC](https://community.cumulocity.com/t/how-could-we-use-another-format-to-do-the-payload/5384/3 "2021-07-14T20:34:43Z")

</div>

Hi Karsten,

I understand your explanation, but we can’t modify the text.

We identified that the format is SenML and not JSON. Is there a possibility to Cumulocity IoT read this format or use some middleware Software AG to converter this?

Tks.

Rodrigo Maruyama

---

<div class="post-metadata">

**Author:** ![Martin\_Wroblinski](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/martin_wroblinski/32/25140_2.png) [@Martin\_Wroblinski](https://community.cumulocity.com/u/Martin_Wroblinski)\
**Post date:** [July 21, 2021, 7:26am UTC](https://community.cumulocity.com/t/how-could-we-use-another-format-to-do-the-payload/5384/4 "2021-07-21T07:26:26Z")

</div>

Did you have a look onto the webMethods Integration platform? Assumed you are using Cumulocity as a Service you can use [webmethods.io](http://webmethods.io) Integration do perform such transformations. For testing if it fits your purposes can can request a free trial in your Software AG cloud tenant.

---

<div class="post-metadata">

**Author:** ![rmaruyama](https://avatars.discourse-cdn.com/v4/letter/r/ee7513/32.png) [@rmaruyama](https://community.cumulocity.com/u/rmaruyama)\
**Post date:** [July 21, 2021, 12:22pm UTC](https://community.cumulocity.com/t/how-could-we-use-another-format-to-do-the-payload/5384/5 "2021-07-21T12:22:14Z")

</div>

Thank you Martin! I will test this way to integration and inform you that was ok!

---

<div class="post-metadata">

**Author:** ![rmaruyama](https://avatars.discourse-cdn.com/v4/letter/r/ee7513/32.png) [@rmaruyama](https://community.cumulocity.com/u/rmaruyama)\
**Post date:** [July 23, 2021, 7:17pm UTC](https://community.cumulocity.com/t/how-could-we-use-another-format-to-do-the-payload/5384/6 "2021-07-23T19:17:15Z")

</div>

Good afternoon Martin! Is there a document that help to learn [webmethods.io](http://webmethods.io) Integration to do this , please?  
Tks.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [October 21, 2021, 7:17pm UTC](https://community.cumulocity.com/t/how-could-we-use-another-format-to-do-the-payload/5384/7 "2021-10-21T19:17:26Z")

</div>

Closed on October 21, 2021, 7:17pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
