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.
我对 JSONObject 有一些问题。我想检查它是否为空。例如 :
{...., "type:"",...}.
当我有时{...., "type:null,...}.,我可以检查以下内容..
{...., "type:null,...}.
JSONObject thenBy = !configSwitch.isNull("thenBy") ? configSwitch.getJSONObject("thenBy") : new JSONObject();
现在我想检查类型!=“”,我该怎么做?