C#中String.Format格式化json中包含"{" "}"報錯問題解決
json.Append(String.Format("{\"total\":{0},\"col\":{1}}", Count, strJSON));直接會報錯 字符串中包含{或者},則需要用{{ 來代替字符 {,用}} 代替 } 如:json.Append(String.Format("{{\"total\":{0},\"col\":{1}}}", Count, strJSON));
版權所屬: 7787pk.com
本文鏈接: http://7787pk.com/articleinfo/222/
特別聲明:如需轉載,請以鏈接形式注明本文出處!
QQ技術群:308250404
投稿郵箱:post@jsons.cn
針對有價值的原創(chuàng)技術投稿予以一定稿酬
期待有獨特技術、獨特想法的你來加入!