Deserialize JSON: Unexpected character encountered while parsing value: <. Path '', line 0, position 0

Hi All,

I am getting the following error while trying to reserialize the Orchestrator HTTP Response

Deserialize JSON: Unexpected character encountered while parsing value: <. Path ‘’, line 0, position 0.

My Orchestrator HTTP Request End point URL: “https://va33twviss512.us.ad.wellpoint.com/odata/Jobs(Annual.Plan.Unattended.All.Dispatcher)

I got the status code: 200

But when I try to reserialize the Orchestrator HTTP Response, I am getting the above error I mentioned

Your response is most likely not JSON but either XML or HTML. (using <tags>as nodes).

Try if you can set your output method to application/json.
When in doubt: do a writeline of the response before deserializing it, then you see what output you are in fact dealing wih.

@Jeroen_van_Loon

Thank you for the response. Yes, the Otchestrator HTTP response is in HTML format like below.

!DOCTYPE html>\r\n<html lang=“en”>\r\n\r\n <meta charset=“utf-8” />\r\n <meta http-equiv=“X-UA-Compatible” content=“IE=edge” />\r\n <meta name=“viewport” content=“width=device-width, initial-scale=1” />\r\n <meta name=“description” content="" />\r\n <meta name=“author” content="" />\r\n <meta name=“referrer” content=“no-referrer” />\r\n\r\n <base href="/" />\r\n\r\n

Coming to your comment realted to “Output method”, I don’t see any properties in the “Orchestrator HTTP Request” or in “Deserialize JSON” where I can change it to “application/json”. Am I misunderstanding anything here?

Hi @Krithi1 ,

The output you are getting is an not valid.

Instead of using orchestrator http request whi ch required json pay load you could use normal http request activity and call your end point URL with GET method and use Accept Format option to json so that you will get proper json output of your orchestrator jobs in json format. After that you can try using desearialize json to json object or json array to retrieve the data.

Please refer below documentation from uipath

Refer below docs for more understanding on how to get jobs from orchestrator using rest api.

https://docs.uipath.com/orchestrator/reference/jobs-requests

Hi @kirankumar.mahanthi1

For HTTP, I need to pass the tenant name, credentials etc, where as for the Orchestrator HTTP, I don’t need to do all that correct? I am using the swagger end point url’s which can be triggered directly thru Orchestrator HTTP request