gpt4 book ai didi

c# - 如何从json格式中删除 ""

转载 作者:太空宇宙 更新时间:2023-11-03 15:25:45 26 4
gpt4 key购买 nike

{
"ResCode": 1,
"ResStrDisplay": "{"
EmpId ":16,"
FullName ":"
GTPTEST ","
Designation ":"
Software Engineer ","
LastActivity ":"
Sign in recorded at 02 / 12 / 2016 15: 23 from IP address: 115.118.170.121 "}"
}

我想输出如下:

{
"ResCode": 1,
"ResStrDisplay": {
"EmpId": 16,
"FullName": "GTPTEST",
"Designation": "Software Engineer",
"LastActivity": "Sign in recorded at 02/12/2016 15:23 from IP address: 115.118.170.121"
}
}

那么如何删除 "{"Emplid":1,...}" 之前 bracketbreaket 之后的引号逗号怎么去掉。

最佳答案

你可以试试这个:

string s = yourInput;
string fixS = s.Replace("\"{\"", "{");

关于c# - 如何从json格式中删除 "",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35403951/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com