c# beautify json string
public class Product
{
public string Name {get; set;}
public DateTime Expiry {get; set;}
public string[] Sizes {get; set;}
}
public void Main()
{
Product product = new Product();
product.Name = "Apple";
product.Expiry = new DateTime(2008, 12, 28);
product.Sizes = new string[] { "Small" };
string json = JsonConvert.SerializeObject(product, Formatting.None);
Console.WriteLine(json);
json = JsonConvert.SerializeObject(product, Formatting.Indented);
Console.WriteLine(json);
}
Also in JavaScript:
- create and append element in javascript
- js alert
- javascript detect mobile device
- empty textarea using jquery
- mdn select event
- minecraft color codes
- javascript random number
- loop in object javascript
- caesar cipher
- jsx return greatest number between two numbers
- js query string
- reverse proxy using expressjs
- content type json
- mongoose populate filter
- javascript check if empty
- vue.js use scss in balise style
- comment dire le nombre de ligne html en cliquamt sur un boutton javascript
- button copy javascript
- hot to start cypress
- testing library react hooks
- how to remove 000webhost watermark 2019
- jquery detect textarea change
- jquery remove multiple class
- copy php array to javascript