我正在开发阿拉伯语 JSON 服务,并且正在使用 Newtonsoft Json 库。我想知道是否有办法将字符串转换为它的代码点表示形式,例如“\u005C”
目前我正在使用 JsonConverter
Response.Filter = new DeflateStream(Response.Filter, CompressionMode.Compress);
Response.AppendHeader("Content-Encoding", "deflate");
Response.Cache.VaryByHeaders["Accept-encoding"] = true;
Response.ContentEncoding = UTF8Encoding.UTF8;
Response.ContentType = "application/json";
Response.Write(JsonConvert.SerializeObject(obj, Formatting.None));
Response.Cache.SetCacheability(HttpCacheability.NoCache);