第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

在數(shù)據(jù)中使用特殊字符時(shí),Json 解析會(huì)出錯(cuò)

在數(shù)據(jù)中使用特殊字符時(shí),Json 解析會(huì)出錯(cuò)

PHP
12345678_0001 2023-05-26 17:09:18
我面臨 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"}]}))
查看完整描述

1 回答

?
米琪卡哇伊

TA貢獻(xiàn)1998條經(jīng)驗(yàn) 獲得超6個(gè)贊

JSON 語(yǔ)法不允許在字符串值中間使用“原始”換行符。您可以使用\n包含換行符(嗯,技術(shù)上是換行符)的字符。通常,正確的做法是使用經(jīng)過(guò)驗(yàn)證的 JSON 編碼庫(kù)將服務(wù)器端數(shù)據(jù)結(jié)構(gòu)轉(zhuǎn)換為兼容的 JSON 表示法。



查看完整回答
反對(duì) 回復(fù) 2023-05-26
  • 1 回答
  • 0 關(guān)注
  • 268 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)