Unable to create DataTable from json text file

Hi , I need to deserialize json text file and convert the output to Datatable but it gives me error
see the error below.
Deserialize JSON: Unexpected JSON token when reading DataTable. Expected StartArray, got StartObject. Path ‘’, line 1, position 1.

I am attaching the text file, Please help me out. Thank you

here is the sample json data

{
“UserName”: “IBM\dfrmjio”,
“UserEmailAddress”: “IBG\dfrohli”,
“UserDepartment”: “”,
“ProductType”: “DCB”,
“PresentationName”: “Project Returns”,
“PresentationDate”: “2023-02-27T00:00:00”,
“Currency”: “USD”,
“PricingDate”: “2023-03-31T00:00:00”,
“CompanyCleanName”: “BCE”,
“CompanyFactsetTicker”: “BCE-F”,
“PeerFactsetTicker”: null,
“Slides”: [
{
“SlideName”: “AgentEstimates”,
“SlideProductType”: “DCB”,
“SlideTemplatePath”: “”,
“SlideDataPoints”: [
{
“SlideDataPointName”: “FY+1”,
“SlideDataPointValue”: “2023”
},
{
“SlideDataPointName”: “Pre-Announce Date”,
“SlideDataPointValue”: “2023-04-30”
},
{
“SlideDataPointName”: “Research Cut-Off Days”,
“SlideDataPointValue”: “90”
},
{
“SlideDataPointName”: “Display Change as”,
“SlideDataPointValue”: “%”
},
{
“SlideDataPointName”: “General FactSet Estimate 1”,
“SlideDataPointValue”: “Rel Perf Bars”
}
]
},
{
“SlideName”: “Cap Table”,
“SlideProductType”: “DCB”,
“SlideTemplatePath”: “”,
“SlideDataPoints”: [
{
“SlideDataPointName”: “Midpoint Type”,
“SlideDataPointValue”: “MED”
},
{
“SlideDataPointName”: “Research Cut-Off Days”,
“SlideDataPointValue”: “90”
}
]
},
{
“SlideName”: “Ownership Analysis”,
“SlideProductType”: “DCB”,
“SlideTemplatePath”: “”,
“SlideDataPoints”: [
{
“SlideDataPointName”: “Basic Shares”,
“SlideDataPointValue”: “1000000”
},
{
“SlideDataPointName”: “FD ITM Shares”,
“SlideDataPointValue”: “100000”
},
{
“SlideDataPointName”: “FD Shares”,
“SlideDataPointValue”: “200000”
},
{
“SlideDataPointName”: “Show or Hide Style Column (Inst”,
“SlideDataPointValue”: “Show”
},
{
“SlideDataPointName”: “Show or Hide WAC Column (Inst”,
“SlideDataPointValue”: “Show”
},
{
“SlideDataPointName”: “Show or Hide Momentum Arrows (Inst”,
“SlideDataPointValue”: “Show”
}
]
}
]
}

Hi @ismaredia,
Try changing double quotes to single quotes, as

"{
‘UserName’: ‘IBM\dfrmjio’,
‘UserEmailAddress’: ‘IBG\dfrohli’

}"
Please find the documentation link Deserialize JSON (uipath.com)

3 Likes

Hi @ismaredia ,

Could you let us know what is the format of the Datatable Output that would be required ? What are the Columns that we would need to keep.

HI @ismaredia

Welcome to Community!

Checkout this thread

Regards
Sudharsan

The UiPath documentation on Json worked, Thanks everyone!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.