• 大小: 0.06M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-26
  • 语言: C#
  • 标签: json  C#  js  c  

资源简介

C# json使用

资源截图

代码片段和文件信息

using System;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Windows.Forms;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.script.Serialization;

namespace Demo_Json
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender EventArgs e)
        {
            Person p = new Person();
            p.ID = 1;
            p.Name = “大神“;
            p.Age = 28;
            p.BirthDay = DateTime.Now.AddYears(-28);
            var json = new javascriptSerializer() { MaxJsonLength = int.MaxValue };
            string Encode = json.Serialize(p);

            Per

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件         917  2013-07-18 14:10  Demo_Json\Demo_Json.sln
     文件       53760  2013-08-29 11:11  Demo_Json\Demo_Json.v11.suo
     目录           0  2013-08-29 15:35  Demo_Json\Demo_Json\
     文件         167  2013-07-18 14:28  Demo_Json\Demo_Json\App.config
     目录           0  2013-08-29 15:35  Demo_Json\Demo_Json\bin\
     目录           0  2013-08-29 15:35  Demo_Json\Demo_Json\bin\Debug\
     文件       11264  2013-08-29 10:13  Demo_Json\Demo_Json\bin\Debug\Demo_Json.exe
     文件         167  2013-07-18 14:28  Demo_Json\Demo_Json\bin\Debug\Demo_Json.exe.config
     文件       30208  2013-08-29 10:13  Demo_Json\Demo_Json\bin\Debug\Demo_Json.pdb
     文件       22472  2013-08-29 10:14  Demo_Json\Demo_Json\bin\Debug\Demo_Json.vshost.exe
     文件         167  2013-07-18 14:28  Demo_Json\Demo_Json\bin\Debug\Demo_Json.vshost.exe.config
     文件         490  2012-06-06 02:06  Demo_Json\Demo_Json\bin\Debug\Demo_Json.vshost.exe.manifest
     文件        4375  2013-07-18 15:31  Demo_Json\Demo_Json\Demo_Json.csproj
     文件        2842  2013-08-29 10:00  Demo_Json\Demo_Json\Form1.cs
     文件        2823  2013-07-18 16:03  Demo_Json\Demo_Json\Form1.Designer.cs
     文件        5817  2013-07-18 16:04  Demo_Json\Demo_Json\Form1.resx
     目录           0  2013-08-29 15:35  Demo_Json\Demo_Json\obj\
     目录           0  2013-08-29 15:35  Demo_Json\Demo_Json\obj\Debug\
     文件        1632  2013-08-29 10:14  Demo_Json\Demo_Json\obj\Debug\Demo_Json.csproj.FileListAbsolute.txt
     文件         975  2013-08-29 09:51  Demo_Json\Demo_Json\obj\Debug\Demo_Json.csproj.GenerateResource.Cache
     文件        2992  2013-08-29 09:51  Demo_Json\Demo_Json\obj\Debug\Demo_Json.csprojResolveAssemblyReference.cache
     文件       11264  2013-08-29 10:13  Demo_Json\Demo_Json\obj\Debug\Demo_Json.exe
     文件         180  2013-08-29 09:51  Demo_Json\Demo_Json\obj\Debug\Demo_Json.Form1.resources
     文件       30208  2013-08-29 10:13  Demo_Json\Demo_Json\obj\Debug\Demo_Json.pdb
     文件         180  2013-08-29 09:51  Demo_Json\Demo_Json\obj\Debug\Demo_Json.Properties.Resources.resources
     文件        1686  2013-07-18 14:54  Demo_Json\Demo_Json\obj\Debug\DesignTimeResolveAssemblyReferences.cache
     文件        7516  2013-08-29 10:12  Demo_Json\Demo_Json\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     文件           0  2013-07-18 14:10  Demo_Json\Demo_Json\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
     文件           0  2013-07-18 14:10  Demo_Json\Demo_Json\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
     文件           0  2013-07-18 14:10  Demo_Json\Demo_Json\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
     目录           0  2013-08-29 15:35  Demo_Json\Demo_Json\obj\Debug\TempPE\
............此处省略9个文件信息

评论

共有 条评论