BLL/JSONHelper.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Web.Script.Serialization;
/// <summary>
/// JSONHelper 的摘要说明
/// </summary>
public class JSONHelper
{
//对应JSON的singleInfo成员
public string singleInfo = string.Empty;
protected string _error = string.Empty;
protected bool _success = true;
protected long _totalCount = 0;
protected System.Collections.ArrayList arrData = new ArrayList();
protected System.Collections.ArrayList arrDataItem = new ArrayList();
public JSONHelper()
{
}
//public static string ToJSON(object obj)
//{
// JavaScriptSerializer serializer = new JavaScriptSerializer();
// return serializer.Serialize(obj);
//}
//public static string ToJSON(object obj, int recursionDepth)
//{
// JavaScriptSerializer serializer = new JavaScriptSerializer();
// serializer.RecursionLimit = recursionDepth;
// return serializer.Serialize(obj);
//}
//对应于JSON的success成员
public bool success
{
get
{
return _success;
}
set
{
//如设置为true则清空error
if (success) _error = string.Empty;
_success = value;
}
}
//对应于JSON的error成员
public string error
{
get
{
return _error;
}
后面还有 86 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
