We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This looks promising: https://github.com/cloudbase/powershell-yaml
$settings | ConvertTo-Yaml | Set-Content -path "settings.yaml" -Encoding UTF8 $s = get-content -Path settings.yaml -Encoding UTF8 -Raw | ConvertFrom-Yaml
But the second command gives us a hashtable back instead of a pscustomobject, which could also be handled, but needs a second thought.
Good hints on the second topic: https://stackoverflow.com/questions/72218329/unable-to-convert-yaml-to-powershell-object
So this should work
[pscustomobject]$os_list = (ConvertFrom-Yaml -yaml (get-content -Raw C:\Powershell\TestCSVs\variables.stg.yml)) [pscustomobject]$os_list = ConvertTo-Yaml $os_list -JsonCompatible
or this, too
$documentWithVariables = Get-Content -Path ..\variables.stg.yml -Raw |ConvertFrom-Yaml $oData = [PSCustomObject]$documentWithVariables.variables
More notes about using comments aaubry/YamlDotNet#534
Use this in vscode https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml
Link these dependencies directly Package: https://github.com/aaubry/YamlDotNet Module: https://github.com/cloudbase/powershell-yaml
The text was updated successfully, but these errors were encountered:
Changes to allow import and export of yaml files in #4
bf5b4f3
Releasing 0.2.0-alpha1 for testing yaml support in #4
a750d87
Fix for loading yaml due to wrong datatypes in #4
fe39b85
The powershell-yaml always generates hashtable instead of PSCustomObject. With another transformation in json and loading it then, it works fine.
Looks good so far. Currently in testing phase.
Sorry, something went wrong.
This is published now with 0.2.0
No branches or pull requests
This looks promising: https://github.com/cloudbase/powershell-yaml
But the second command gives us a hashtable back instead of a pscustomobject, which could also be handled, but needs a second thought.
Good hints on the second topic: https://stackoverflow.com/questions/72218329/unable-to-convert-yaml-to-powershell-object
So this should work
or this, too
More notes about using comments
aaubry/YamlDotNet#534
Use this in vscode
https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml
Link these dependencies directly
Package: https://github.com/aaubry/YamlDotNet
Module: https://github.com/cloudbase/powershell-yaml
The text was updated successfully, but these errors were encountered: