创建web项目:

string Json = string.Empty;
string filePath = Server.MapPath("/***.json");//根目录下的文件
using (FileStream fs = new FileStream(filePath, FileMode.Open, System.IO.FileAccess.Read, FileShare.ReadWrite))
{
  using (StreamReader sr = new StreamReader(fs, Encoding.GetEncoding("gb2312")))
  {
    Json = sr.ReadToEnd().ToString();
  }
}

相关文章:

  • 2022-12-23
  • 2021-09-20
  • 2022-12-23
  • 2022-01-01
  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
猜你喜欢
  • 2022-03-10
  • 2022-12-23
  • 2022-12-23
  • 2021-09-08
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案