【发布时间】:2012-07-19 08:40:15
【问题描述】:
我想这样创建:
[
['date', 'T1', 'T2', 'T3'],
['2000', 1, 1, 0.5],
['2001', 2, 0.5, 1],
['2002', 4, 1, 0.5],
['2003', 8, 0.5, 1],
['2004', 7, 1, 0.5]
]
来自我的模型
public partial class AylikOkumaIstatistik
{
public string sno { get; set; }
public string date{ get; set; }
public Nullable<decimal> TotalUsageValue { get; set; }
public string UsageType { get; set; } // T1,T2,T3
}
这可以通过使用 json 实现吗?如果可能的话,有没有关于这个主题的代码示例或教程。如何将数据库中的数据转换为 json?
谢谢。
【问题讨论】:
标签: asp.net-mvc json