cancel
Showing results for 
Search instead for 
Did you mean: 

Covert Json Response to Required Data Formats

vinodchinthakin
Level 9
Hi All,

I would like to convert Json response to required data formats.

1. I am using an API, which compresses image and output response will be in Json(Text) format. How can I convert Response content into Image(Binary) data type?
2. I am using an API which converts HTML to PDF and output response will be in Json(Text) format. How can I convert response content into PDF(Binary) data type?

Note: we have utility JSON which helps in converting Json to Collection. But we need to convert Json to other formats, do we have any Assets or Codes for that?

Any suggestions!
Thanks in advance.
VINOD

------------------------------
vinod chinthakindi
------------------------------
15 REPLIES 15

After including file path getting an error "No conversion available from Text to Collection"

------------------------------
vinod chinthakindi
------------------------------

Must be something wrong on your end. Screenshot would help to debug. Check the data type of the output parameters that you have configured.

Just ran a test and it worked. I had passed URL, method and FilePath only.

------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------

Hi Shashank,

Issue got resolved. Basically process got corrupted. I tried same action in a new process, it worked.
Can we handle same thing in API, by writing some code. Do you have any code for that?

------------------------------
vinod chinthakindi
------------------------------

Hi Vinod,

Current implementation of WebAPI doesnt support binary responses. Utility - Http is the way to go for such scenarios.

------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------

Hello Shashank,

I appreciate your feedback.

I have come across the same situation where I am receiving a binary response for a PDF file as text via Web Api and I need to download/store this pdf in local system. Following your advice, I attempted to resolve the issue using HTTP Request File VBO, but I encountered an error. Interestingly, I received a binary response in Postman and a binary as text response in WEB API using the same input configuration, indicating that there is no authentication issue. I have included screenshots for your reference.

I would greatly appreciate your assistance and guidance in resolving this issue.

18413.png

18414.png



------------------------------
Amrutha Sivarajan
------------------------------

HI @Amrutha Sivarajan 

If you could post a screenshot from POSTMAN that would be useful to pinpoint the issue.

18424.png



------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------