This was just a choice of OP and also isn’t a concern in PowerShell:
gc ./some.yml | ConvertFrom-Yaml | ConvertTo-Json > some.json
This was just a choice of OP and also isn’t a concern in PowerShell: