You are viewing limited content. For full access, please sign in.

Question

Question

How to use data returned from HTTP Web Request Activity?

asked on April 10, 2014

Hi,

 

I have been able to successfully connect to a Web Service and it successfully returns data. The data returned is in JSON format or at least that's what the Web Service documentation says. It kind of looks like CSV formatted data.

 

I would like to know how to use this data returned by the Web Service. The HTTP Web Request activity exposes it's output as "Content File" to other activities. What is the suggested next steps in using this data?

 

My goal is to insert this data, row by row, into a SQL table.

 

Thanks

Sheldon

1 0

Replies

replied on July 23, 2014

I hope this is in the product roadmap.  JSON is a very common format.

2 0
replied on April 10, 2014

Currently workflow doesn't have a JSON parser, you could try changing the preferred response format to XML and see if the web service supports that. Then you could use the Read XML activity to parse out things that are of interest to you.

1 0
replied on December 16, 2014

There is another way using the Pattern Matching activity. This '({.*?}),?' pattern should get all of your json objects into a multi valued token. In the Pattern Matching activity make sure and select "All matches (as a multi-value token)", then you should be able to use a "For Each Value" to iterate the multi valued token and further parse the values out. It is a bit of a chore, but worth not having to change your webservice to export xml. XML is so last century.

1 0
replied on October 26, 2018

For those interested in parsing JSON responses in Workflow, as of version 10.x there is now a "Read JSON" tool which uses JPath to isolate JSON elements.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.