我得到这样的结果
{"Label":"My Second dataset","FillColor":"rgba(151,187,205,0.2)","StrokeColor":"rgba(151,187,205,1)","PointColor":"rgba(151,187,205,1)","PointStrokeColor":"#fff","PointHighlightFill":"#fff","PointHighlightStroke":"rgba(151,187,205,1)","Data":[28.0,48.0,40.0,19.0,86.0,27.0,90.0]};
错误是
Uncaught SyntaxError: Unexpected token &
我该如何解决这个问题?
根据代码铸造者的评论
您应该将 JSON 字符串包装在@HTML中。生:
@Html.Raw(yourJSON);