JSON & omitempty?

41 views
Skip to first unread message

andreas...@gmail.com

unread,
Jul 1, 2016, 8:27:07 PM7/1/16
to Webhooks
Hi all,

I'm a frustrated newbie trying to integrate a number of systems via webhook. My current problem: POST bodys with placeholders for integers which are not necessarily delivered. Meaning: get errornous POST calls, e.g. "importantNumer": , --> so without any value at all. Thhe receiving system cannot handle this.

Now I stumbled upon something called omitempty, which seems to work with stringss (e.g. "userName": "{{name}}, omitempty". Can anyone tell me if this works for integers too? And if so? What would the right syntax be? I'm in dire need of help. And sleep :-).

John Sheehan

unread,
Jul 1, 2016, 11:02:25 PM7/1/16
to Webhooks, andreas...@gmail.com
I would post this to stackoverflow.com with more detail about the payloads (including full examples).

If you need to capture some requests to show others use requestb.in or Runscope
Reply all
Reply to author
Forward
0 new messages