How to read nested JSON in Codename One

£可爱£侵袭症+ 提交于 2019-12-06 07:50:47

After parsing your json data based on this, you can use Result to read deep into the json content:

import com.codename1.processing.Result;

...

Map<String, Object> data = json.parseJSON(r);
Result result = Result.fromContent(data);
String id = result.getAsString("glossary/GlossDiv/GlossList/GlossEntry/ID");
String para = result.getAsString("glossary/GlossDiv/GlossList/GlossEntry/GlossDef/para");
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!