In this post, we will see how to resolve How to convert object to Json in .net core 6 JsonConverter
Question:
Im trying to convert a object that looks like the object below into Json in .net core 6?The route im currently trying is using JsonConverter in my Program.cs file but not sure if this route makes sense.
Best Answer:
you are mixing in one bottle Newtonsoft.Json and System.Text.Json serializers. JObject and JsonObject are completely different classes. You will have to select something oneNewtonsoft.Json
If you have better answer, please add a comment about this, thank you!
Source: Stackoverflow.com
Leave a Review