麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁(yè) > 學(xué)院 > 開(kāi)發(fā)設(shè)計(jì) > 正文

csharp:jsontocsharp

2019-11-14 13:38:50
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

 http://json2csharp.com/
 http://jsonclassgenerator.codeplex.com/
 http://jsonutils.com/ JSON生成類(lèi)文件
 https://github.com/bladefist/JsonUtils ///

http://jsonlint.com/ 檢測(cè)JSON文件

http://json.codeplex.com/

https://www.mssqltips.com/sqlservertip/3449/making-sql-server-metadata-queries-easier-with-these-new-views/

http://www.sqlteam.com/article/using-metadata

https://github.com/dotnet/docfx  文檔轉(zhuǎn)換

http://www.codePRoject.com/Articles/192938/jQuery-Templates-View-Engines-and-JSON-Services

http://www.codeproject.com/Articles/266473/JSON-API

http://www.codeproject.com/Articles/630300/JSON-Viewer

http://www.codeproject.com/Articles/78928/Create-JSON-from-C-using-JSON-Library

http://www.codeproject.com/Articles/159450/fastJSON

 

  public class Rating    {        public int max { get; set; }        public int numRaters { get; set; }        public string average { get; set; }        public int min { get; set; }    }    public class Tag    {        public int count { get; set; }        public string name { get; set; }        public string title { get; set; }    }    public class Images    {        public string small { get; set; }        public string large { get; set; }        public string medium { get; set; }    }    public class Series    {        public string id { get; set; }        public string title { get; set; }    }    public class Example    {        public Rating rating { get; set; }        public string subtitle { get; set; }        public IList<string> author { get; set; }        public string pubdate { get; set; }        public IList<Tag> tags { get; set; }        public string origin_title { get; set; }        public string image { get; set; }        public string binding { get; set; }        public IList<string> translator { get; set; }        public string catalog { get; set; }        public string pages { get; set; }        public Images images { get; set; }        public string alt { get; set; }        public string id { get; set; }        public string publisher { get; set; }        public string isbn10 { get; set; }        public string isbn13 { get; set; }        public string title { get; set; }        public string url { get; set; }        public string alt_title { get; set; }        public string author_intro { get; set; }        public string summary { get; set; }        public Series series { get; set; }        public string price { get; set; }    }

  

 WebClient client = new WebClient();                client.Credentials = CredentialCache.DefaultCredentials;                  client.Encoding = Encoding.UTF8;                strjson = client.DownloadString(URL);                //MessageBox.Show(strjson);                //string reply = client.UploadString(URL, data);                //var jsonlist = JsonConvert.DeserializeObject<List<DoubanBoookInfo>>(strjson);                BookExample book = new BookExample();                book = JsonConvert.DeserializeObject<BookExample>(strjson);                // MessageBox.Show(book.title);                this.textBoxprice.Text = book.price;                this.textBoxpubdate.Text = book.pubdate;                this.textBoxtitle.Text = book.title;                this.textBoxImage.Text = book.image;                Images imgurl = book.images;                Encoding encoding = Encoding.GetEncoding("utf-8");                //驗(yàn)證服務(wù)器證書(shū)回調(diào)方法                 ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(CheckValidationResult);                 //1                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(book.image);                request.Method = "GET";                 HttpWebResponse response = (HttpWebResponse)request.GetResponse();                //String ver = response.ProtocolVersion.ToString();                Stream stream = response.GetResponseStream();                List<byte> list = new List<byte>();                while (true)                {                    int data = stream.ReadByte();                    if (data == -1)                        break;                    else                    {                        byte b = (byte)data;                        list.Add(b);                    }                }                byte[] photocontent = list.ToArray();                Image photo = BytesToImage(photocontent);                this.pictureBox1.Image = photo;                //2                HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(imgurl.large);                objRequest.Method = "GET";                 HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();                Stream streambs = objResponse.GetResponseStream();                 System.Drawing.Image img = System.Drawing.Image.FromStream(streambs);                this.pictureBox2.Image = img;

  

        /// <summary>        ///         /// </summary>        /// <param name="bytes"></param>        /// <returns></returns>        public Image BytesToImage(byte[] bytes)        {            MemoryStream ms = new MemoryStream(bytes);            ms.Position = 0;            Image img = Image.FromStream(ms);            ms.Close();            return img;        }        /// <summary>        ///         /// </summary>        /// <param name="stream"></param>        /// <returns></returns>        public byte[] StreamToBytes(Stream stream)        {            byte[] bytes = new byte[stream.Length];            stream.Read(bytes, 0, bytes.Length);            // 設(shè)置當(dāng)前流的位置為流的開(kāi)始            stream.Seek(0, SeekOrigin.Begin);            return bytes;        }        /// <summary>        ///         /// </summary>        /// <param name="bytes"></param>        /// <returns></returns>        public Stream BytesToStream(byte[] bytes)        {            Stream stream = new MemoryStream(bytes);            return stream;        }        /// <summary>        ///         /// </summary>        /// <param name="fileName"></param>        /// <returns></returns>        private byte[] SetImageToByteArray(string fileName)        {            FileStream fs = null;            try            {                fs = new FileStream(fileName, FileMode.Open, System.IO.Fileaccess.Read, FileShare.ReadWrite);                Bitmap bt = new Bitmap(fs);                int streamLength = (int)fs.Length;                byte[] image = new byte[streamLength];                fs.Read(image, 0, streamLength);                return image;            }            catch (Exception)            {                throw;            }            finally            {                fs.Close();            }        }        /// <summary>        ///         /// </summary>        /// <param name="stream"></param>        /// <param name="fileName"></param>        public void StreamToFile(Stream stream, string fileName)        {            // 把 Stream 轉(zhuǎn)換成 byte[]            byte[] bytes = new byte[stream.Length];            stream.Read(bytes, 0, bytes.Length);            // 設(shè)置當(dāng)前流的位置為流的開(kāi)始            stream.Seek(0, SeekOrigin.Begin);            // 把 byte[] 寫(xiě)入文件            FileStream fs = new FileStream(fileName, FileMode.Create);            BinaryWriter bw = new BinaryWriter(fs);            bw.Write(bytes);            bw.Close();            fs.Close();        }        /// <summary>        ///         /// </summary>        /// <param name="fileName"></param>        /// <returns></returns>        public Stream FileToStream(string fileName)        {            // 打開(kāi)文件            FileStream fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read);            // 讀取文件的 byte[]            byte[] bytes = new byte[fileStream.Length];            fileStream.Read(bytes, 0, bytes.Length);            fileStream.Close();            // 把 byte[] 轉(zhuǎn)換成 Stream            Stream stream = new MemoryStream(bytes);            return stream;        }

  https://github.com/CosmosOS/Cosmos

http://cosmos.codeplex.com/

https://github.com/dotnet/corefx

https://github.com/fsharp

https://github.com/Microsoft/vscode/

https://github.com/adobe/brackets

https://github.com/qihangnet/npoi.CSS

https://github.com/hprose

https://ltaf.codeplex.com/SourceControl/latest

https://github.com/jmarnold/EmbeddedMail

https://xunit.codeplex.com/

https://github.com/markrendle/Simple.Data

https://github.com/jamietre/CsQuery

https://github.com/Microsoft/vscode/

https://github.com/matteocrippa/awesome-swift

https://github.com/kud1ing/awesome-rust

https://github.com/avelino/awesome-go

https://github.com/sorrycc/awesome-javascript

https://github.com/quozd/awesome-dotnet

https://github.com/Moq/moq4

http://fastreflectionlib.codeplex.com/SourceControl/latest

https://github.com/davidebbo/WebActivator

https://razorgenerator.codeplex.com/

https://github.com/RazorGenerator/RazorGenerator

http://dan.cx/projects/routejs

https://github.com/enyim/EnyimMemcached

https://github.com/tathamoddie/System.IO.Abstractions

 https://github.com/NLog/NLog

http://www.quartz-scheduler.net/

http://dotnetopenauth.net/

https://pangusegment.codeplex.com/

http://lucenenet.apache.org/

https://github.com/NancyFx

https://github.com/quartznet/

http://sourceforge.net/projects/quartznet/

https://github.com/DotNetOpenAuth/DotNetOpenAuth

https://github.com/DotNetOpenAuth/DotNetOpenAuth.Samples

https://github.com/NancyFx

https://github.com/MassTransit/MassTransit

http://code.google.com/p/masstransit/

asp.net MVC 3 RTM Tools Update

https://www.microsoft.com/zh-cn/download/confirmation.aspx?id=1491

http://orchard.codeplex.com/SourceControl/latest

http://aspnet.codeplex.com/SourceControl/latest

https://github.com/Microsoft/dotnet

https://github.com/dotnet/core

https://github.com/aspnet/EntityFramework

http://www.dotnetfoundation.org/projects

https://www.myget.org/gallery/dotnet-core


發(fā)表評(píng)論 共有條評(píng)論
用戶(hù)名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 亚洲日韩中文字幕一区 | 免费a级毛片永久免费 | 黄色大片在线免费看 | 羞羞网站在线看 | 免费黄色短视频网站 | 午夜色片 | 亚洲欧美在线看 | 免费毛片随便看 | 国产精品成人亚洲一区二区 | 天天看成人免费毛片视频 | 亚洲小视频在线 | 成年人激情在线 | 成人免费电影在线观看 | 亚欧在线免费观看 | 中文字幕偷拍 | 国产91九色视频 | 日韩免费黄色 | 91九色视频 | 伊人久久国产精品 | 亚洲va久久久噜噜噜久牛牛影视 | 久久久国产精品网站 | 色妇视频| 青热久思思| 欧美一级淫片a免费播放口 91九色蝌蚪国产 | 久久精品日产第一区二区三区 | 亚洲码无人客一区二区三区 | 一级空姐毛片 | 爱视频福利 | 国产精品9191 | 九九精品影院 | 好吊色欧美一区二区三区四区 | xxx日本视频 | 91网站在线观看视频 | 有兽焉免费动画 | 中文字幕在线播放视频 | 久久久一区二区精品 | 激情久久一区二区 | 91 视频网站 | 色综合久久久久综合99 | 九九热九九爱 | 自拍偷拍亚洲图片 |