Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我来自 HTTP 的 response.bodyget如下所示:
get
{"Code":1,"Message":"Successfully retrieved subscriberId","Result":22687813}
如何将“Result”的值声明为变量?
已解决 这是我缺乏 Ruby 技能和 JSON 经验的结果,通过在 puts response.body["Message"] 之前执行“JSON.parse response.body”来解决。