同一实体的不同json视图 [英] different json views for the same entity

查看:65
本文介绍了同一实体的不同json视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道您将如何启用同一实体的不同json视图(例如,公共数据和仅经过身份验证的列表视图,完整详细信息等)?

i am wondering How would you enable different json views of the same entity (example, public data and authenticated only, list views, full details, etc)?

如果有的话 Jboss AS 7 + RestEasy或春季+球衣.

in case if there are Jboss AS 7 + RestEasy or spring + jersey .

我正在研究必须根据登录用户及其角色填充不同数据的应用程序.

I am working on application which has to populate different data according to logged in user and its role.

谢谢

推荐答案

下面的链接可能有帮助

http://wiki.fasterxml.com/JacksonJsonViews

这里详细说明了如何创建和应用不同的视图

This has detailed explanation of how to create different views and apply them

这篇关于同一实体的不同json视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆