I am creating input.json file and i am able to do it but the problem is : this input.json has been created in UCS-E2 BOM encoding format. I think, it is by default encoding format. but i need this in encoding utf format becuase i am getting error while reading through java programming. I have tried couple of solutions but it did not work.
$inputFileJson = @{}
$inputFileJson.Add("abc", "xyz")
$inputFileJson.Add("def", "pqr")
$inputFileJson | ConvertTo-Json -Depth 20 | Out-File 'C:\\Ashish\input.json' -Force
Please help me on this or you can share any article that can help