In this lecture we go over the popular library
Newtonsoft.Json (Json.NET): how it differs from the built-in
System.Text.Json, how to get started quickly, serialize objects and collections, configure behavior via
JsonSerializerSettings, work with LINQ to JSON (
JObject,
JArray) and avoid common mistakes. We'll show attributes (
[JsonIgnore],
[JsonProperty]), formatting (
Formatting.Indented), handling cyclic references and explain when to choose Json.NET over the standard serializer.