我想把Dictionary转换成Json。键是一个字符串,值是CompaignModel的ICollection:
IDictionary<string, ICollection<BuzzCompaignModel>> BuzzCompaignByInterest ;
下面是包含BuzzCompaign模型的内容:
public class BuzzCompaignModel
{
public long BuzzCompaignId { get; set; }
public string Name { get; set; }
我的页面中有以下几行代码,我希望将其转换为javascript数组/对象。但是我控制不住自己
<script language="javascript" src="json2.js"></script>
<script>
json={"status":"error","message":"there was an error","type":"unclassified"};
alert(json.stringify(json));
我有一个JSON请求,它返回一个jQuery字符串形式的对象。这里我要做的是将JSON转换成jQuery对象,并将值赋给html元素……下面是要转换的对象的结构:
var Userrights = {
Id: // an id element
ScreenRights: // this is a list with following elements
{
ScreenName:
Create:
Read: