private JSONObject initClassesFromApiSub(JSONObject jsonParent) {
		long parentId = 0;
		try {
			parentId = jsonParent.getLong("cid");
			TaobaoClient client = new DefaultTaobaoClient(server, appkey,
					secret);
			ItemcatsGetRequest req = new ItemcatsGetRequest();
			req.setParentCid(parentId);
			ItemcatsGetResponse response;
			response = client.execute(req, sessionKey);
			JSONObject json = new JSONObject(response.getBody().toString());
			JSONArray children = json.getJSONObject("itemcats_get_response")
					.getJSONObject("item_cats").getJSONArray("item_cat");
			for (int i = 0; i < children.length(); i++) {
				JSONObject child = (JSONObject) children.get(i);
				if (child.getBoolean("is_parent")) {
					child = initClassesFromApiSub(child);
				}
			}
			jsonParent.put("children", children);
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ApiException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return jsonParent;
	}