C# Language Getting Started: Json with C# Serialization

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

 static void Main(string[] args)
    {
        Book[] books = new Book[3];
        Author author = new Author(89,"Aldous Huxley","Author",books);
        string objectDeserialized = JsonConvert.SerializeObject(author); 
        //Converting author into json
    }

The method ".SerializeObject" receives as parameter a type object, so you can put anything into it.



Got any C# Language Question?