3 ms·
Genuine question - how would I do this in VB.net? Is is as painful as I imagine, with a lot of classes?
by jacobush 8y ago
Genuine question - how would I do this in VB.net? Is is as painful as I imagine, with a lot of classes?
- josteink 8y agoI don’t think that’s painful at all. Yes you define it as a root class, with dependent classes as needed. This is the contract. It needs to be defined somehow, and IMO this is as good a way as any. From there on you just use JSON.NET to convert your JSON-string to an instance of the root type, literally one line of code. And after that you get code-completion and type-inference and compile-time checking for all data-object access. It’s an absolute no-brainer.
- jacobush 8y agoThanks! I need to look into that.