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.
相關文章
相關標籤/搜索