how to Json serialize object in c# code example Example: object to json c# using Newtonsoft.Json; var jsonString = JsonConvert.SerializeObject(obj);