gothinkster / aspnetcore-realworld-example-app

ASP.NET Core backend implementation for RealWorld
https://realworld.io
MIT License
1.93k stars 548 forks source link

Circular references from Article #85

Open thesheps opened 4 years ago

thesheps commented 4 years ago

It looks as though the existing System.Text.Json serialisation library is having problems trying to serialise the Article object graph upon trying to create a new article:

System.Text.Json.JsonException: A possible object cycle was detected which is not supported.

I've been able to fix this on my local (Ubuntu) setup by using the Newtonsoft library instead. If there's an appetite to go after this fix I can create a PR with my changes later this evening?

adamhathcock commented 4 years ago

Please submit a PR. I actually thought I was using Newtonsoft but my memory is fading.

System.Text.Json isn't very usable until .NET 5.0 or later

thesheps commented 4 years ago

Absolutely no worries at all, I'll have a play tonight - thanks!

On Wed, Sep 2, 2020 at 11:55 AM Adam Hathcock notifications@github.com wrote:

Please submit a PR. I actually thought I was using Newtonsoft but my memory is fading.

System.Text.Json isn't very usable until .NET 5.0 or later

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gothinkster/aspnetcore-realworld-example-app/issues/85#issuecomment-685616096, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWSTN5C4RPARHPHR4X2W6DSDYQDTANCNFSM4QS26PEA .

adamhathcock commented 3 years ago

Should be fixed. No longer using Newtonsoft at all. https://github.com/gothinkster/aspnetcore-realworld-example-app/pull/86