简体   繁体   中英

Parsing JSON with endline characters when receiving it from the server

I have a JSON that looks like so:

{
    "response": {
        "event": "Other",
        "time_opened": "2014-09-09 10:09:07",
        "time_updated": "2014-09-10 09:34:55",
        "name": "blablablablablabla",
        "current_status": "blablabla

blablablablablablablablablablablabla

blablablablablablablablabla

blablablablablablablablabla

"
    }
}

I get "Uncaught SyntaxError: Unexpected token" on JSON.parse. After research I couldn't figure out how to wrangle it. Sorry if duplicate, but I'm a little lost here.

该问题已通过适当的编码服务器端解决。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM