我想知道我的json不正确...我知道有一个语法错误所以请为我纠正。
({
ageRestriction: false,
allowedCountries: [
],
user: {
ip: '184.173.107.5',
name: ''
},
player: {
bufferTime: 60,
debug: false,
window: false,
panel: false,
autoplay: true,
smoothing: true,
scale: 'letterbox'/*none,
stretch,
letterbox,
zoom*/,
iframeControl: false
},
similar: {
path: '/actions/control/similaritems/50e54d84d681c00e603935e3',
preview: '//s.dogannet.tv/q/i/76/600x336/50e54e8cd681c00e603935e4'
},
watermark: {
path: '//s.dogannet.tv/n/s/content/images/watermark.png?v=2',
position: 'bottomright'
},
media: {
id: '50e54d84d681c00e603935e3',
controller: 'osmf',
defaultServiceUrl: 'http: //media.netd.com.tr',
serviceUrl: 'http: //37.48.66.141',
path: 'S1/HLS_VOD/5ea1_1536/index.m3u8?key=49bfee85b05d117a2906368428094e94&app=com.dcom&max=1500',
preview: '//s.dogannet.tv/q/i/76/1600x900/50e54e8cd681c00e603935e4'
},
playlog: {
callback: function(data){
data.Application='com.dcom';data.UserName='';data.SessionId='m443qmsgz3mdlnwing2h4qno';data.AnonymId='d241c910-6ae1-4f73-afc4-7cb5991517d4';data.ItemId='50e54d84d681c00e603935e3';data.Url='http: //www.netd.com/diziler/yerli/kanit/kanit-1-sezon/kanit-1-bolum';data.extraData={
'Agent': navigator.userAgent
};$.ajax({
type: "POST",
url: "http://stats.dogannet.tv/playlog.ashx",
data: data,
global: false,
async: true,
cache: false
});
}
},
heartbeat: {
interval: 10000,
callback: function(data){
data.Application='com.dcom';data.UserName='';data.SessionId='m443qmsgz3mdlnwing2h4qno';data.AnonymId='d241c910-6ae1-4f73-afc4-7cb5991517d4';data.ItemId='50e54d84d681c00e603935e3';data.Url='http: //www.netd.com/diziler/yerli/kanit/kanit-1-sezon/kanit-1-bolum';data.SessionId='m443qmsgz3mdlnwing2h4qno';data.extraData={
'Agent': navigator.userAgent
};$.ajax({
type: "POST",
url: "http://stats.dogannet.tv/heartbeat.ashx",
data: data,
global: false,
async: false,
cache: false
});
}
},
gemius: {
materialIdentifier: '1',
identifier: 'AfVAtKMRq0Ff4WlROmmKr7Po31j_P7s.VdXOiWt3SGL.x7',
hitCollector: 'http: //str.hit.gemius.pl'
},
comscore: {
c1: '1',
c2: '17476642'
},
advert: {
display: true,
skipShowDuration: 9,
preroll: 'http: //app.medyanetads.com/vast.a2?target=netd_videoad_arsivdizi_preroll&channel=50e54d84d681c00e603935e3&category=11534404&keywords=kanit,
prof_dr_sevil_atasoy,
engin_benli,
inci_demirkaya,
deniz_celiloglu&videoid=463_50e54d84d681c00e603935e3',
midroll: 'http: //app.medyanetads.com/vast.a2?target=netd_videoad_arsivdizi_midroll&channel=50e54d84d681c00e603935e3',
postroll: 'http: //app.medyanetads.com/vast.a2?target=netd_videoad_arsivdizi_postroll&channel=50e54d84d681c00e603935e3',
overlay: 'http: //app.medyanetads.com/vast.a2?target=netd_videoad_arsivdizi_overlay&channel=50e54d84d681c00e603935e3',
pauseroll: 'http: //app.medyanetads.com/vast.a2?target=netd_videoad_pauseroll&channel=50e54d84d681c00e603935e3',
viscaleShowDuration: 30,
viscaleRatio: 0.3889,
viscale: "http://app.medyanetads.com/vast.a2?target=netd_videoad_viscale&channel=52fddcab68f7320be461c2e9"
},
survey: {
display: true,
path: 'http: //app.medyanetads.com/survey/survey.swf',
domain: 'netd.com'
}
});
});
请正确我不知道哪里出错了。我想用http://jsonlint.com/来纠正它但我无法完成
答案 0 :(得分:1)
你应该将你的密钥包装在双引号中,如下所示:
{
"ageRestriction": false,
"allowedCountries": [
],
"user": {
"ip": "184.173.107.5"
...
如果您的值也是字符串,那么它们也应该在双引号内,如上例所示。 请参阅此处的确切规范:http://www.json.org/