在JSON中,键必须用双引号(
")而不是单引号(
')引起。同样,字符串值必须用双引号而不是单引号引起来。您正在使用单引号。例如,
authorId标题文字前后。
因此,至少,您需要交换这些引号,例如:
data: '{"authorID" : "' + authorID + '", "title" : "' + enpreURIComponent(blogTitle) + '", "msg" : "' + enpreURIComponent(blogBody) + '", "preview" : "' + enpreURIComponent(mediaContent) + '", "layoutID" : "' + previewLayoutId + '", "threadID" : "' + threadID + '"}'


