I would like to do something like we have in Netwonsoft Json:
options.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore
And also have in System.Text.Json
:
JsonSerializerOptions options = new()
{
ReferenceHandler = ReferenceHandler.IgnoreCycles
};
But because there is almost not documentation for the newest 8.x version I cannot get it to work. And I didn't find any examples of how to use or instantiate the SourceSerializerFactory
.
Thanks in advance!