JSON prepare with .Net 2.0
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.
精彩评论