Steps to reproduce
echo "testline1" > test.txt
echo "testline2" >> test.txt
$textContent = Get-Content .\test.txt
$json=ConvertTo-Json -InputObject $textContent -Depth 10
Expected behavior
ConvertTo-Json should not hang and it should display proper error or exception
Actual behavior
ConvertTo-Json cmdlet hangs
Environment data
> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.16299.248
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.16299.248
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Steps to reproduce
Expected behavior
Actual behavior
Environment data