var dict = new Dictionary<string, string>();

dict.Add("FirstName", "John");
dict.Add("LastName", "Doe");

var json = Newtonsoft.Json.JsonConvert.SerializeObject(dict);

Note: Does NOT work with Azure Function. Create an C# object first and then pass the C# object.

Last modified: March 30, 2021

Author

Comments

Write a Reply or Comment