码迷,mamicode.com
首页 > Web开发 > 详细

读取JSON文件

时间:2019-10-09 09:44:56      阅读:98      评论:0      收藏:0      [点我收藏+]

标签:ext   http   get   col   str   ade   sys   style   reader   

   string menuStr = "";// " 消息内容";
            Encoding encode = System.Text.Encoding.GetEncoding("GB2312"); //编码,否则会出现json中文乱码
            using (StreamReader sr = new StreamReader(HttpContext.Server.MapPath("/Json/sendmessage.json"), encode))
            {
                menuStr = sr.ReadToEnd();
            }

 

读取JSON文件

标签:ext   http   get   col   str   ade   sys   style   reader   

原文地址:https://www.cnblogs.com/lyq666666/p/11639429.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!