Phil-Factor / PSYaml

A Powershell module to convert YAML documents to and from PowerShell objects
MIT License
91 stars 32 forks source link

ConvertFrom-Yaml and Convert-YamlToJson Cmdlets do not work with string[] as returned by Get-Content #21

Open avonwyss opened 6 years ago

avonwyss commented 6 years ago

This can be worked around by using -Raw on the Get-Content Cmdlet, but it would be nice if the Cmdlets would behave the same as the original ones for Json, Csv and Xml, which seem to have no issue with string[] as returned from Get-Content.

Phil-Factor commented 6 years ago

Agreed, it would be a good idea to fix this. It is an aim to make these cmdlets as compatible as possible to the JSON ones

rsteenwyk commented 6 years ago

Just bumped into this myself, was rather confused and kept checking different YAML linters to see if I was doing anything wrong in my YAML.

Phil-Factor commented 5 years ago

ConvertTo-YAML (get-content 'MyPath\test.txt')

... produces ...

is this wrong?

Phil-Factor commented 5 years ago

Aargh. Caught out by the markdown. Read those as dashes