cancel
Showing results for 
Search instead for 
Did you mean: 

How to find incoming data format(json,xml) dynamically in pipeline input view?

Surendar
Contributor

How to find incoming data format dynamically?

Say for example,

  1. If the incoming data is JSON then I need to perform certain validation and flow for JSON
  2. If the incoming data is xml then I to perform certain operations.

Can any one suggest How to find incoming data format during the run-time. by using single input view for the pipeline?

6 REPLIES 6

Hi for me it didn’t work due to on postman, Headers Content-Type was set to the default
application/x-www-form-urlencoded. After I changed it to
text/csv or application/json depending on the file I chose,
and on the Binary Router snap, I did
$[“content-type”]==“text/csv”
$[“content-type”]==“application/json”
the Post then worked as expected.

pjanapati
New Contributor II

Hi @mina ,

In previous reply, you have mentioned like through router snap using content-type field routed the data. I am trying to route the data based on content-type. But I didn’t get the content-type. Can you please help me with this. How to get that content-type data?
Thanks in advance.