RestSharp AddBody adding double quote in JSON parameter

RestSharp AddBody adding double quote in JSON parameter

I am calling API with RESTSharp

I am calling API with RESTSharp

  var client = new RestClient("http://demoservice.com");
  var request = new RestRequest("callapi", "put");          
  request.RequestFormat = DataFormat.Json;

string jsonaction = "{"tokenid":"x123x45","userid":"2456","ip":"192.168.1.20","transaction":"6","actionCode":"78","jtoken":"systemtoken"}"; request.AddBody(new { action = "SAVE", data = "savedata", token = "systemtoken", jsonaction = jsonaction });

I am checking in debug data passing in request. and my expected output as follows

{"action":"SAVE","data":"savedata","token":"systemtoken","jsonaction":{"tokenid":"x123x45","userid":"2456","ip":"192.168.1.20","transaction":"6","actionCode":"78","jtoken":"systemtoken"}}

But getting

{"action":"SAVE","data":"savedata","token":"systemtoken","jsonaction":"{"tokenid":"x123x45","userid":"2456","ip":"192.168.1.20","transaction":"6","actionCode":"78","jtoken":"systemtoken"}"}

If anybody can guide how to post for JSON I have tried with Addbody and AddJsonBody but nothing works.

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Web Design Service in USA

Looking for designers for your business website design? We at Data EximIT offer our best **[web designing services in the USA](https://www.dataeximit.com/services/ "web designing services in the USA")** with the aim of craft your website more...

For World Class Web Development Services in India visit RB Genie

Do you want excellent and world class web development services for your valuable projects? Contact **RB Genie **now, we have more than 8 years experienced team of web developers, which specializes in overall web design and website development...

Building Authenticated Web app with C#, Blazor and ASP.NET Core 3.0

Goodbye Javascript! Now, i can Building an Authenticated Web App in C# with Blazor + ASP.NET Core 3.0.