You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 8, 2024. It is now read-only.
I'd imagine that ReferenceLoopHandling.Ignore would be a suitable default for this use case, but if there's concern around that it'd be great if the option was exposed in some way.
The text was updated successfully, but these errors were encountered:
@jorismathijssen You can fork/copy the project and change the line I linked to above from:
var settings = new JsonSerializerSettings() { ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver() };
to
var settings = new JsonSerializerSettings() { ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver(), ReferenceLoopHandling = ReferenceLoopHandling.Ignore };
@svallis I did add the referenceLoopHandling to the global.asax file and had a lot of out of memory exceptions. I think there is a lot more wrong with my project. I will try this sollution!
Objects that self-reference are triggering an exception when being serialized:
See:
http://stackoverflow.com/questions/7397207/json-net-error-self-referencing-loop-detected-for-type
https://github.com/ALMMa/datatables.aspnet/blob/master/src/DataTables.AspNet.AspNetCore/DataTablesResponse.cs#L162
I'd imagine that
ReferenceLoopHandling.Ignore
would be a suitable default for this use case, but if there's concern around that it'd be great if the option was exposed in some way.The text was updated successfully, but these errors were encountered: