i have class
class abc{
[JsonPropertyName("firstName")]
public string FirstName{get; set;}
[JsonPropertyName("lastName")]
public string LastName{get; set;} }
i am assigning some values in it one method.
public void DownloadJson(){
abc abcModel= new abc(){ FirstName="Tom", LastName="Torres"};
var test = JsonConvert.SerializeObject(abcModel);
}
i want to save(download) this test object in json file on my browserwithout directing in new window just simply download it in same method DownloadJson() and in current window.