3 ms·
This generate strong types from example JSON messages, and there are handy methods in C# that let you take a JSON string and parse it as a given class. This way
by xpaulbettsx 16y ago
This generate strong types from example JSON messages, and there are handy methods in C# that let you take a JSON string and parse it as a given class. This way, other devs know what fields to expect in the JSON message and saves them time on digging through the raw JSON.
- random42 16y agoI understand the benefits of object oriented approach, vs the free formed JSON. Is it possible to create class dynamically in C#, or is it supposed to be one time effort (and the tool does it automatically it, as opposed to doing it manually)?
- tianyicui 16y agoIt is possible to create class dynamically in C#. Although I don't know whether this library is doing it.
- barrydahlberg 16y agoTypically with something like this it will be a one time effort because the code produced is what enables the development time tools like intellisense. .Net does have run time code generation options but unfortunately we don't have support in the tool chain to tie them back to these sorts of tools.
- jonathankeith 16y agoDynamic support is present in .NET/C# as of version 4.0. Consuming JSON in applications written or currently running on prior versions leaves one with little choice than writing static types to deserialize to.