我正在尝试将JSON从一个.html文件复制到Visual Studio 2013中的另一个。更新4,粘贴的结果正在剥离所有:JSON属性和值之间给我无用的标记。
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading font-bold">Spline</div>
<div class="panel-body">
<div ui-jq="plot" ui-options="
[
{ data: {{d}}, points: { show: true, radius: 6}, splines: { show: true, tension: 0.45, lineWidth: 5, fill: 0 } }
],
{
colors: ['{{app.color.info}}'],
series: { shadowSize: 3 },
xaxis:{
font: { color: '#ccc' },
position: 'bottom',
ticks: [
[ 1, 'Jan' ], [ 2, 'Feb' ], [ 3, 'Mar' ], [ 4, 'Apr' ], [ 5, 'May' ], [ 6, 'Jun' ], [ 7, 'Jul' ], [ 8, 'Aug' ], [ 9, 'Sep' ], [ 10, 'Oct' ], [ 11, 'Nov' ], [ 12, 'Dec' ]
]
},
yaxis:{ font: { color: '#ccc' } },
grid: { hoverable: true, clickable: true, borderWidth: 0, color: '#ccc' },
tooltip: true,
tooltipOpts: { content: '%x.1 is %y.4', defaultTheme: false, shifts: { x: 0, y: 20 } }
}
" style="height:240px" >
</div>
</div>
</div>
</div>
正在转变为:
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading font-bold">Spline</div>
<div class="panel-body">
<div ui-jq="plot" ui-options="
[
{ data {{d}} , points { show true, radius 6}, splines { show true, tension 0.45, linewidth 5, fill 0 } }
],
{
colors ['{{app.color.info}}'],
series { shadowsize 3 },
xaxis:{
font { color '#ccc' },
position 'bottom' ,
ticks [
[ 1, 'Jan' ], [ 2, 'Feb' ], [ 3, 'Mar' ], [ 4, 'Apr' ], [ 5, 'May' ], [ 6, 'Jun' ], [ 7, 'Jul' ], [ 8, 'Aug' ], [ 9, 'Sep' ], [ 10, 'Oct' ], [ 11, 'Nov' ], [ 12, 'Dec' ]
]
},
yaxis:{ font { color '#ccc' } },
grid { hoverable true, clickable true, borderwidth 0, color '#ccc' },
tooltip true,
tooltipopts { content '%x.1 is %y.4' , defaulttheme false, shifts { x 0, y 20 } }
}
" style=" height:240px">
</div>
</div>
</div>
</div>
大问号。
答案 0 :(得分:1)
这是一个有点复杂的json直接放入参数,但无论如何......如果你在粘贴后按一次撤消,你可以撤消Visual Studio尝试的自动格式化。你的分号也将被恢复。