using Newtonsoft.Json;
|
using Newtonsoft.Json.Linq;
|
using System;
|
using System.Collections.Generic;
|
using System.Text;
|
|
namespace SmsSendTool
|
{
|
public class SmsMsgEntity
|
{
|
private string mobile = string.Empty;
|
/// <summary>
|
/// 手机号码
|
/// </summary>
|
public string Mobile
|
{
|
get { return mobile; }
|
set { mobile = value; }
|
}
|
|
|
private string content = string.Empty;
|
/// <summary>
|
/// 短信内容
|
/// </summary>
|
public string Content
|
{
|
get { return content; }
|
set { content = value; }
|
}
|
|
private string appendid = string.Empty;
|
/// <summary>
|
/// 扩展号
|
/// </summary>
|
public string Appendid
|
{
|
get { return appendid; }
|
set { appendid = value; }
|
}
|
|
|
public SmsMsgEntity(string json)
|
{
|
try
|
{
|
JObject msg = (JObject)JsonConvert.DeserializeObject(json.Replace(@"\", "/"));
|
this.Mobile = msg["mobile"].ToString();
|
this.Content = msg["content"].ToString();
|
this.Appendid = msg["appendid"].ToString();
|
}
|
catch (Exception ex)
|
{
|
|
}
|
|
}
|
}
|
}
|