Just wanted to add... C# being strongly typed language, some times can be a pain.
Just spent an hour trying to parse a JSON String; changing its parts and again de-serializing it... working with JObject, JToken, etc..so on; Though i'm just getting familiar with it.
WorldMaker|3 years ago
The documentation still includes pages on dynamic, even though dynamic has become a mostly forgotten feature and there are still developers that would never use dynamic. For example: https://www.newtonsoft.com/json/help/html/QueryJsonDynamic.h...
I appreciate that dynamic exists in C#. I've done some wild things with dynamic over the years. It sometimes makes me sad how under-appreciated a tool it can be.
ETA: Obviously dynamic is not type-safe, it's a great escape hatch from type safety for small cases where "just do what I want" is nicer/more natural than type safety. As the sibling comment points out, if you still prefer type safety there are type deserializers that can be easier to use. These days with records in C# 9+ writing quick types to deserialize to is even relatively painless.
setr|3 years ago
The beauty of types in this case is that the JSON structure has a natural way to be expressed in C#… we just need to utilize it
Or a JsonNode if you don’t know the structure
metaltyphoon|3 years ago
https://www.howtosolutions.net/2020/07/visual-studio-creatin...
unknown|3 years ago
[deleted]