CopyPastor

Detecting plagiarism made easy.

Score: 1; Reported for: String similarity Open both answers

Possible Plagiarism

Reposted on 2019-03-14
by Peter-kin

Original Post

Original - Posted on 2019-03-14
by Peter-kin



            
Present in both answers; Present only in the new answer; Present only in the old answer;

json.net serializer supports to ignore circular reference on global setting. A quick fix is to put following code in WebApiConfig.cs file:
config.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
The simple fix will make serializer to ignore the reference which will cause a loop. However, it has limitations:
The data loses the looping reference information The fix only applies to JSON.net The level of references can't be controlled if there is a deep reference chain
json.net serializer supports to ignore circular reference on global setting. A quick fix is to put following code in WebApiConfig.cs file:
config.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
The simple fix will make serializer to ignore the reference which will cause a loop. However, it has limitations:
The data loses the looping reference information The fix only applies to JSON.net The level of references can't be controlled if there is a deep reference chain

        
Present in both answers; Present only in the new answer; Present only in the old answer;