3 ms·
In the world of Powershell, reflection would be the way to go because then I still have an object. A rough analogy would be the window object in Javascript wher
by brudgers 11y ago
In the world of Powershell, reflection would be the way to go because then I still have an object. A rough analogy would be the window object in Javascript where I call `window.open(something)` directly. Serializing a value returned by a Powershell command to JSON eliminates being able to call `returned_value.some_method(something)` because converting it into JSON puts me in the world of text and parsing.
At that point, I either know the name of the method I'm looking for or I don't. In the first case the conversion to JSON doesn't do me any good because I can just call the method directly using `object.method(value)`. In the second case, it doesn't do any good because I don't know the method I want.
Reflection looks more like this: http://stackoverflow.com/questions/9952391/use-get-member-for-reflection http://stackoverflow.com/questions/9952391/use-get-member-fo...