Sorry If this is a dead post but this situation is exactly what I am experiencing. I am using an API connection to Dayforce inside of a function I will later use to write to the employee table. I tried the method above but getting an error.
Here is the code
var client ="apiUrlHere";
var restClient = new RestClient(client);
var response = restClient.Execute(request);
string dsTemp = $"{{newEmployee: [{response}]}}";
this.output = JsonConvert.DeserializeObject<DataSet>(dsTemp);
the error I get in Postman when trying to call the function is:
Sorry! Something went wrong. Please contact your system administrator. Correlation Id: b2ea37ff-5e2c-468f-865e-29adee6f54be
the log file has a lot. I can post more, but the base of it is:
<![CDATA[Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: R. Path ‘newEmployee’, line 1, position 17.
Calling the API in Postman I get the below data:
{
“Data”: {
“EmployeeNumber”: “115165”,
“FirstName”: “Matthew”,
“LastName”: “Best”
}
}