I have my HttpWebRequest body that needs to be in JSON array format and I have to populate it dynamically at run time.
Dim body As String = "{""studentForm"":[{""title"":""Law Major"",""description"":""Excellent Student. Work hard. Very Intelligent, and so on..."",""phone"":""0123456789"",""categoryId"":1197,""categoryName"":""Senior Student"",""parentCategory"":9,""location"":{""latitude"":45.151053,""longitude"":-79.398193,""radius"":1000},""categoryAttributes"":[],""imageUrls"":[]}]}"
So I need to have variables like varTitle, varDescript, varDescript, and so on into the JSON array. I tried to do that the below way but doesn't work.
Dim body As String = "{""studentForm"":[{""title"":varTitle,""description"":varDescript,""phone"":varDescript,""categoryId"":1197,""categoryName"":""Senior Student"",""parentCategory"":9,""location"":{""latitude"":45.151053,""longitude"":-79.398193,""radius"":1000},""categoryAttributes"":[],""imageUrls"":[]}]}"
I read about Deserialization / Serialization from a couple of websites but still can't achieve what I'm looking for.