Home  • Programming • C#.NET

Stringify json in C# ASP.net core

select-name-cmbcountry Method 1 using System.Web.Script.Serialization;
  var json = new JavaScriptSerializer().Serialize(new {name='jahid',age=24});
Method 2 using Newtonsoft.Json;
var json=JsonConvert.SerializeObject(new {name='jahid',age=24});

Comments 0


Share

Copyright © 2024. Powered by Intellect Software Ltd