简体   繁体   中英

PowerShell, error when serializing to JSON

I'm having the following content in a JSON file :

{ 
    "edit_errorcantloadgoogleaddress":  "Impossible de récupérer les propositions d\u0027adresses \"{code}\"."
}

parsing it and saving it back the following way :

$a = Get-Content -Raw -Path D:\test.json | ConvertFrom-Json
$a | ConvertTo-Json

I obtain the following result which does not parse :

{
    "edit_errorcantloadgoogleaddress":  "Impossible de récupérer les propositions d\u0027adresses \"{
                                            code
                                        }\"."
}

Does anybody have an idea on how to solve this?

正如@ user2871239所提到的,这是一个与版本有关的问题,我升级到PS 4.0来解决它。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM