-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ConvertFrom/To-Hashtable and/or ConvertTo-PSCustomObject cmdlets #159
Comments
Are we really trying to convert between hashtables and objects, or is this for serialization? If it's the later, a very robust version of this already exists in the Configuration module (specifically, in it's MetaData submodule, but exported by Configuration). If you want recursive conversion of live objects, I could extract that into a function and expose it, but it's currently not accessible. |
I think the need here is for:
The only complexity I see here is that PSD can have dynamic bits in it ( |
Seeing this again, this part is wrong. The Restricted Language Mode is only true of module manifests. However, it does raise the question of whether a module manifest with such dynamic fields should be expected to parse with one of the proposed cmdlets |
Could always have a |
Yeah the latter is what I'm imagining. I already wrote a little parser for the strict version. I just need to publish it somehow... The RLM version means taking a dependency on the PowerShell runtime, which I'm less keen on, but should be ok in the cmdlet. I'd like to break it up into the core library and the cmdlet, with the cmdlet able to also parse RLM |
Related discussion in #109, specifically this comment:
We think the scenario we're trying to address is primarily casting nested hashtables of hashtables into PSCustomObjects (or possibly even other types).
The text was updated successfully, but these errors were encountered: