I have a workflow webhook with a JSON body. I...

I have a workflow webhook with a JSON body. I have included fields that may or may not have a value as below:

{

“UUID”: “<<[InputID]>>”,

“Date”: “<<[CallDate]>>”,

“JobType”: <<[Job Type]>>,

“SubType”: <<[Sub type]>>, //Optional field

“Description”: “<<[Fault/Description]>>” }

The result is that the JSON sent looks like: {

“UUID”: “ABC-123”,

“Date”: “2018-05-21T11:45”,

“JobType”: 1,

“SubType”: , // Not specified number

“Description”: “” // not specified text }

But this is not being seen as valid JSON as by the receiving system since

“SubType”: , does not have a value. Is there a way to put a 0 placeholder or suppress the line when the value is blank?

Thanks,

David

0 4 648
4 REPLIES 4
Top Labels in this Space