Retrieves the JSONArray with the associated key. @webref jsonobject:method @webBrief Retrieves the JSONArray with the associated key @param key a key string @return A JSONArray which is the value, or null if not present @throws RuntimeException if the value is not a JSONArray. @see JS
(String key)
| 810 | * @see JSONObject#setJSONArray(String, JSONArray) |
| 811 | */ |
| 812 | public JSONArray getJSONArray(String key) { |
| 813 | Object object = this.get(key); |
| 814 | if (object == null) { |
| 815 | return null; |
| 816 | } |
| 817 | if (object instanceof JSONArray) { |
| 818 | return (JSONArray)object; |
| 819 | } |
| 820 | throw new RuntimeException("JSONObject[" + quote(key) + "] is not a JSONArray."); |
| 821 | } |
| 822 | |
| 823 | |
| 824 | public IntList getIntList(String key) { |
no test coverage detected