开发者

JSON prepare with .Net 2.0

开发者 https://www.devze.com 2023-02-21 02:30 出处:网络
I am limited to .Net 2.0 framework.How can I replace all invalid characters in a string?I am building a string array in JSON format and outputting it to the screen.

I am limited to .Net 2.0 framework. How can I replace all invalid characters in a string? I am building a string array in JSON format and outputting it to the screen.

I tried using .Replace 开发者_如何学Goto get rid of the characters I know cause problems (like \n, \, [, ], {, }), but errors persist.


I've had a similar problem and ended up using System.Net.Json.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号