Answer the question
In order to leave comments, you need to log in
Why is JSON invalid?
When trying to JSON.parse a string containing this JSON, an error occurs - https://pastebin.com/raw/xFf8JJEL (don't pay attention to the extra comma, by chance)
Validation in online validators also fails (you can copy it directly from the browser, I checked, the error is reproduced)
How to parse such lines? The original line is here, in the JSON-LD script tag - https://hiphopdx.com/news/id.53774/title.mc-eiht-s...
Answer the question
In order to leave comments, you need to log in
I don’t know how you pass the string to JSON.parse, but everything is fine with me
Obviously, the problem is a long space.
Change the encoding back and forth from CP-1251 to UTF-8 and back, it will most likely help.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question