It uses Newtonsoft’s JSON package. The configuration has to be done in ‘ConfigureServices’ method
services
.AddMvc()
.AddJsonOptions(options => options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore)
.SetCompatibilityVersion(CompatibilityVersion.Version_2_2);