Created
December 19, 2019 13:16
-
-
Save 0x414c49/c934ec97c2922e00fe9f481b3e679611 to your computer and use it in GitHub Desktop.
Script-CS example
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
using System; | |
using Newtonsoft.Json; | |
class Product | |
{ | |
public Guid Id{get;set;} | |
public string Name{get;set;} | |
public bool Enabled{get;set;} | |
} | |
var productObj = new Product { | |
Id = Guid.NewGuid(), | |
Name = "FooBar", | |
Enabled = true | |
}; | |
Console.WriteLine(JsonConvert.SerializeObject(productObj)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment