JSON序列化与反序列化是处理数据的方法
发布时间
阅读量:
阅读量
一.把一个对象序列化JSON.
1.目标账户
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace JSONDemo
{
public class Account
{
public string Email { get; set; }
public bool Active { get; set; }
public DateTime CreateDate { get; set; }
public IList<string> Roles { get; set; }
}
}
- 对Account对象进行序列化处理。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
us
全部评论 (0)
还没有任何评论哟~
