
public WebResult getCategoryListByParentId(Long parentId){
List<Category> categoryList = this.categoryService.findAllCategoryByParentId(parentId,Constants.COURSE);
JSONObject jResult = new JSONObject();
jResult.accumulate("categoryList", categoryList);
final String finalResultString = jResult.toString();
JsonResult json = new JsonResult() {
@Override
protected void onSerialize(ServletOutputStream outputStream) throws IOException {
outputStream.write(finalResultString.getBytes("UTF-8"));
}
};
return json;
}