'how convert key value class to json

i am a class with definition below

 public class Param
    {
        public string Key { get; set; }
        public object Value { get; set; }

        public Param(string key, object value)
        {
            this.Key = key;
            this.Value = value;
        }
    }

a objects with values

var params = new List<Param>(){new Param("k1","v1"),new Param("k2","v2"),new Param("k3","v3")};

How to build a json with this structure.

{
"k1":"v1",
"k2":"v2",
"k3":"v3"
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source