Created
August 16, 2017 23:46
-
-
Save geoffreymcgill/c7551f10ddef5abf24a345182ac5556e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Product product = new Product(); | |
product.Name = "Apple"; | |
product.ExpiryDate = new DateTime(2008, 12, 28); | |
product.Price = 3.99M; | |
product.Sizes = new string[] { "Small", "Medium", "Large" }; | |
string output = JsonConvert.SerializeObject(product); | |
//{ | |
// "Name": "Apple", | |
// "ExpiryDate": "2008-12-28T00:00:00", | |
// "Price": 3.99, | |
// "Sizes": [ | |
// "Small", | |
// "Medium", | |
// "Large" | |
// ] | |
//} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment