Serialization
suggest changestatic 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.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents