System.text.json VS Newtonsoft.json

Why a new JSON serializer?

What is the new JSON serializer missing?


This sample sets ReferenceLoopHandling to Ignore so that looping values are excluded from serialization instead of throwing an exception.

string json = JsonConvert.SerializeObject(foo, Formatting.Indented, new JsonSerializerSettings
ReferenceLoopHandling = ReferenceLoopHandling.Ignore
dynamic p = JsonSerializer.Parse(json, typeof(ExpandoObject));




Freelance Software Engineer

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store