Today I came across a bad Python question (this is what it looked like at the time I found it) that has accumulated millions of views and thousands of upvotes over the years.
A summary of its problems:
- It was titled "Parsing values from a JSON file?", which made it a gigantic click magnet. (First Google result for "python parse json" and similar queries)
- The "JSON" data is actually invalid, but this isn't obvious at first glance.
- The OP included a piece of code that - supposedly - parses the JSON and "prints all of it". This clearly isn't true, as the data isn't valid JSON, so in reality the code throws an Exception.
- The OP asked "How can I parse the file and extract single values?", which is terribly unclear (what "single values" are they trying to extract?).
Long story short, this question could/should have been closed as unclear and/or no MCVE. Because it wasn't closed, it has attracted some low-quality answers - some answers correctly point out that the JSON isn't actually JSON, while others simply ignore this issue and show some generic code for parsing JSON in Python.
I'm unsure how to deal with this train wreck.
I don't believe there's much value in this question - "your JSON is invalid" isn't an answer that's useful for an awful lot of people. I've edited the title to something less click-magnet-y, in hopes of pushing the question off the #1 spot on Google. Given its immense popularity, though, I'm afraid that it'll continue to show up in people's Google searches and waste their time.
What should we do about this question?