Creation of Json string using entries of Excel Sheet

Hi. I have a use case to pass a Json string through REST Api. The JSON string is to be constructed using column name as Key and respective rows as values from an excel sheet. I have extracted the required info from the excel sheet but facing problem in construction a valid json as the json is being created using variables obtained from excel data.
For e.g: {
“attributes” : {
“Name” : “NewLion”,
“extrude” : 8123,
“visibility” : 634
}
}
I’ve tried using:(please refer to attached image)

But, I’m getting invalid Json error.
Please help!

You are missing some double quotes :
Try this
“{”“attributes”“:”“{”“Name”“:” & Name.tostring & “,” & “extrude” & “:” & extrude.tostring & “}”“}”

1 Like

Hi Hareesh,

When I apply same method to my Project. Am getting response as

“Name” : NewLion
Here Name attribute we are single without any quotations due to this, HTTP activity responds NULL response in the output. Can you please take a look into this?

I expect output should be

“Name” : “NewLion” where NewLion value should extract from the excel.

Regards
Student

Heyy @Aish

If you want those quotes to be appended, you can append those. Let me know if you need anything

Hello Ravi,
In this video I do a lot of stuff with JSON (Chapter included) :

0:45 Install Deserialize JSON
1:10 Present all types of JSON that will use
1:35 Deserialize simple JSON
2:50 Deserialize a JSON with an Object inside
3:55 Deserialize a JSON with Array inside
6:00 When we use Deserialize JSON Array activity
7:00 Deserialize a JSON with a List of Strings inside
9:45 Create a simple JSON
11:05 Create a JSON with an Object inside
12:17 Create a JSON with Array inside
14:05 Create a JSON with a List of Strings inside
15:55 Datatable to JSON
17:50 JSON to Datatable

Thanks,
Cristian Negulescu