Answer the question
In order to leave comments, you need to log in
How to parse "impure" JSON?
In general, there is a link. According to her JSON, packed in html->body->pre. I have no idea why the API is given that way.
Question: how to parse it?
At this point, nothing (blank) is passed to JSON.parse
response = Net::HTTP.get(uri)
JSON.parse(response)
A JSON text must at least contain two octets!
Answer the question
In order to leave comments, you need to log in
Fully show the text, judging by the error, the impression is that the response does not even have two bytes.
According to her JSON, packed in html->body->pre.
h = JSON.parse(response)
p h.keys
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question