Params keyword in JSON object

c#, json, json.net

Solution

Use @params so you can escape special keywords

Problem

I am creating a JSON object in code. But the JSON contains property `params`, so when I try to create object like this: ``` using Newtonsoft.Json.Linq; JObject json = JObject.FromObject(new { jsonrpc = "2.0", method = "user.login", params = new { user = "user", password = "password" }, id = 1 }); ``` I get an error because VS thinks its `params` the keyword. Is there way how to create object like this or somehow use `params` without using `params`?

Original source