I am a ruby newbie.
Have a question that, I write a script to access a site’s API, with
httpclient library, and get the response from it.
The response content is just JSON string.
My question is how to let people access the result via method with the
method name is the key in JSON?
For example, I got the response JSON:
name: “John Smitp”,
How do I convert it to an object, when people call obj.name get “John
I hope I describe the question clearly.
Thanks in advance.