How to Convert Json Output to Datatable

Hi all,

How to convert json output to datatable?

This is my output.

image

Hi @mazlumkacar Use Deserialize json and set the Type argument to Data table.

When i try to deserialize it to datattable, getting this error:

@Tushar_Karkera
@Palaniyappan

1 Like

Can you please print the value you got in Message box and share here

Hi @mazlumkacar

try to loop the httpresult in for each item

and then print the values

Thanks
Ashwin S

Try converting json string into Json object through Deserialize json.and then convert json object to data table.

image

Here is the message box value:

{
“message”: “{“GetCalculatedPrice_Res”:{“EV_MESSAGE”:“Kayıt bulunamadı.”}}”,
“level”: “Information”,
“logType”: “User”,
“timeStamp”: “13:52:51”,
“processVersion”: “1.0.0”,
“jobId”: “073f312f-90fd-4acf-8fae-df44ef69210b”,
“robotName”: “DevRobot”,
“machineId”: 9
}

I want to convert it to datatable.
@karthick

Can you please validate this JSON and try

how can i validate it?

@karthick

Did this thread help us on this

Cheers @mazlumkacar

Your Json is not valid i believe

Can you go through this

Json Validator is available online . You can validate it there .

destination path applied to double qoutes

1 Like

Got it. I need to convert all one double qoutes to two double qoutes. But how can i do that? When i try to write String.Replace(""","""") it doesn’t let me write it. How to convert all one double quotes to two double quotes?

@RaveenaMurugan
@Tushar_Karkera
@Palaniyappan

1 Like

Hi @mazlumkacar use strText.Replace("""","""""")

1 Like

But it is not what i need to. The code has to convert " to “”.

@Tushar_Karkera
@Palaniyappan
@RaveenaMurugan

didnt get your question.Did u try my method.