我正在使用ASP.NET MVC 4中的WebApi,我正在尝试将正确的json传递给HighStock图表。
json语法显示为here。
具体来说,这部分我无法创建:
[{
x : Date.UTC(2011, 3, 25),
title : 'H',
text : 'Euro Contained by Channel Resistance'
}, {
x : Date.UTC(2011, 3, 28),
title : 'G',
text : 'EURUSD: Bulls Clear Path to 1.50 Figure'
}, {
x : Date.UTC(2011, 4, 4),
title : 'F',
text : 'EURUSD: Rate Decision to End Standstill'
}, {
x : Date.UTC(2011, 4, 5),
title : 'E',
text : 'EURUSD: Enter Short on Channel Break'
}, {
x : Date.UTC(2011, 4, 6),
title : 'D',
text : 'Forex: U.S. Non-Farm Payrolls Expand 244K, U.S. Dollar Rally Cut Short By Risk Appetite'
}, {
x : Date.UTC(2011, 4, 6),
title : 'C',
text : 'US Dollar: Is This the Long-Awaited Recovery or a Temporary Bounce?'
}, {
x : Date.UTC(2011, 4, 9),
title : 'B',
text : 'EURUSD: Bearish Trend Change on Tap?'
}]
如何控制单引号应包围值?我有所有相关数据,问题只是将数据转换为这个json。