I want to send a raw nested JSON using RestSharp. I am able to send a normal JSON using RestSharp as follows.
request.AddBody(new {
sender = "Alice",
receiver = "Bob",
message = "We did it!"});
But what I really want to achieve is :
request.AddBody(new {
bizcardData = "{
"name" = "johannes",
"company" = "AppLab",
"designation" = "Mobile App Developer",
"phone" = "5135921240",
"email" = "[email protected]",
}",
transData = {
"date" = "20150805_221024",
"location" = "39.1395996,-84.5295417",
"tag" = "sender"
}
});
But this code is not working.
I am using Firebase and there is a problem in using POST with AddParameter(); So, I want to send using raw JSO format. I am unable to send a nested JSON this way. It would be great if you could help me with suggestions as of how to do it.
Thanks!