org.json.JSONObject的getString和optString使用注意事项

结论:org.json.JSONObject的getString如果取不到对应的key会抛出异常,optString则不会 /** * Returns the value mapped by {@code name} if it exists, coercing it if * necessary, or throws if no such mapping exists.
相关文章
相关标签/搜索