Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
AlgoRythm5025413dI'm not even sure what you're looking to achieve. Dictionary<string, object> ? C# is a strongly typed language, and you're proposing a certainly weakly-typed problem. Dynamic being in C# at all is crap, frankly. It's like `any` in TypeScript. Ruins the point, total crap to work with, the source of many headaches.
-
tosensei845313dyou're complaining that there is no easy way to do something in _dynamic objects_ in a language that is known and valued for its great _static_ typing? seriously?
when you use a bicycle, do you complain about it not being a good juice press, too? -
donkulator306613d@AlgoRythm Yup. Using dynamic in that scenario is introducing a lot of filth just so you can say obj.foo instead of obj["foo"]. And the latter more accurately represents what you're doing.
-
tosensei845313daddendum:
https://learn.microsoft.com/en-us/...
your complaints are invalidated by the documentation. -
Demolishun3505113dI need to post wrong takes more often. I find how its supposed to be done faster.
@tosensei
Every time I saw JSON DOM in the docs I was kinda glazing over thinking it was "web shit". lol -
Demolishun3505113d@AlgoRythm maybe I am just looking for reasons to hate it. Learning for work. Trying to get over the learning curve so I feel like I know it enough to stop hating it. I would rather be using this:
https://doc.qt.io/qt-5/json.html -
Demolishun3505113dWith all the boiler plate of the json writer it would probably have been quicker to do object serialization...
It is 2024 and C# doesn't seem to have a simple way to parse json data into dynamic objects. It wants some husk classes to read into. I will have to find a good third party library for this. I was thinking C# would have this, but no. I see there is something from asp stuff, but I have no clue what I have to import to get that.
random