We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
At the moment I have to do in the following way to apply SerializeFilter to JSON response:
SerializeFilter
@GetAction("/") public RenderJSON hospitalInfo() { List<RSHospitalInfo> list = new ArrayList<RSHospitalInfo>(); RSHospitalInfo hospital = new RSHospitalInfo(); hospital.setHospitalName("中山第一人民医院"); hospital.setId(SnowflakeIdWorker.getSnowflakeId()); hospital.setCreateTime(new Date()); hospital.setUpdateTime(new Date()); list.add(hospital); List<Map<String, String>> parseObject = JSONArray.parseObject( JSON.toJSONString(list, new BeanPropertyFilter()), List.class); return renderJson(parseObject); }
Can we provide better support for developer to specify SerializeFilter in Act application?
The demo app: https://pan.baidu.com/s/1slogSOH
The text was updated successfully, but these errors were encountered:
Now you can do it in the following way:
@GetAction("/") @ResponseContentType(H.MediaType.JSON) @FastJsonFilter(BeanPropertyFilter.class) public Object hospitalInfo() { List<RSHospitalInfo> list = new ArrayList<RSHospitalInfo>(); RSHospitalInfo hospital = new RSHospitalInfo(); hospital.setHospitalName("中山第一人民医院"); hospital.setId(SnowflakeIdWorker.getSnowflakeId()); hospital.setCreateTime(new Date()); hospital.setUpdateTime(new Date()); list.add(hospital); return list; }
Sorry, something went wrong.
9ec11be
No branches or pull requests
At the moment I have to do in the following way to apply
SerializeFilter
to JSON response:Can we provide better support for developer to specify
SerializeFilter
in Act application?The demo app: https://pan.baidu.com/s/1slogSOH
The text was updated successfully, but these errors were encountered: