Code example for JSONObject

Methods: getStringisNull

	 * @param key 
	 * @return 
	 * @throws JSONException 
	private static String getStringWithNull(JSONObject object, String key) throws JSONException{
		if(object.isNull(key)) return null;
		return object.getString(key);
	public List<EntityData> getAllChildrenOfEntity(String parentId) throws SynapseException, JSONException, InterruptedException {
		String rootQuery = QUERY_CHILDREN_OF_ENTITY1 + "\"" + parentId + "\"";
		return queryForAllPages(rootQuery, ENTITY, MAX_PAGE_SIZE, null);
	 * Get all of the pages starting with a root query. 
	 * This will execute the query one page at a time until all of the results are fetched. The page size is set by the limit. 
	 * @param client 
	 * @param rootQuery 
Connect your IDE to all the code out there  Get Codota for Java