我面臨 json 解析錯(cuò)誤。我向我的服務(wù)器發(fā)送一個(gè)獲取請(qǐng)求,服務(wù)器返回一個(gè) json 數(shù)據(jù)。該請(qǐng)求是從 wordpress 站點(diǎn)發(fā)送的。所以json數(shù)據(jù)然后被php函數(shù)編碼。它適用于普通文本,但在數(shù)據(jù)中包含特殊字符時(shí)不起作用。這是我的服務(wù)器返回的數(shù)據(jù)。我正在嘗試使用解析數(shù)據(jù)JSON.parse(myData)console.log(JSON.parse({"Sun Jun 21 2020 00:00:00 GMT+0600 (+06)":[{"id":17,"club_id":8,"isPublished":1,"eventName":"?lprovning","eventImg":"/uploads/zHvJJJk6bG8eqjKcWpNRBevha6ZlyMTYGqC9k6Oe.jpeg","eventLocation":"TV? FETA GRISAR | Hisingen","eventDate":"2020-06-20T18:00:00.000Z","eventTime":"08:00","eventFee":300,"eventLimit":49,"eventDescription":"Var med p? v?r ?lprovning av v?ra nya ?l 2020. Vi har 8 st helt nya ?l f?r s?songen, vilken ?r din favorit?Vi ?ppnar portarna kl 19:30 f?r de som ?r registrerade som vipkund","publish":"","recurringDays":0,"created_at":"2020-06-15 15:43:47","updated_at":"2020-06-15 15:43:47","accepted":[],"__meta__":{"singedup_count":0},"dayName":"Sun","monthName":"June","dayOfTheMonth":"21"}],"Wed Jul 29 2020 00:00:00 GMT+0600 (+06)":[{"id":16,"club_id":8,"isPublished":1,"eventName":"Padelresa","eventImg":"/uploads/LYtDyBC65IhXZhaQeKko2UjzViGxkYnFTKVYLXVF.jpeg","eventLocation":"Marbella","eventDate":"2020-07-28T18:00:00.000Z","eventTime":"08:00","eventFee":8900,"eventLimit":20,"eventDescription":"H?ng med till h?ftiga Marbella ocean club och lira padel 10 g?nger under 5 dAGAR7 n?tter i dubbelrum7 frukostar och 6 middagar5 heldagsgreenfeeflygflygskatttransport av golfbagflygplatstransferservice av v?r golfv?rd och pro","publish":"","recurringDays":0,"created_at":"2020-06-15 15:50:14","updated_at":"2020-06-15 15:51:55","accepted":[],"__meta__":{"singedup_count":0},"dayName":"Tue","monthName":"August","dayOfTheMonth":"25"}]}))
在數(shù)據(jù)中使用特殊字符時(shí),Json 解析會(huì)出錯(cuò)
12345678_0001
2023-05-26 17:09:18