如何在 zoho 中 json 解码

How to json decode in zoho

我的json代码:输入

{"responseCode":"200","responseText":"ID: 2ce934c860f48b02fb755178f8ac0a2"}

如何在 zoho creator 中 json 解码 ==> 这是对的吗?

responseCode=jsondata.getJSON("responseCode");
responseText=jsondata.getJSON("responseText");
SMS_ID=responseText.getJSON("ID");

几乎是正确的。请注意 "ID: 2ce934c860f48b02fb755178f8ac0a2" 只是一个字符串,而不是 JSON 元素。

试试:

responseText=jsondata.getJSON("responseText");
SMS_ID = responseText.remove("ID: ");