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)?
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.
Thanks
This depends how you want to design you application.
The basic design for this kind of requirement is to use the session management to produce the data OR json for each request from the servers.When the request comes from a browser it has a unique session associated with all the request coming form the same browser.
Once the user is logged in create a session for that request ( Means for that user) by putting that user in session or putting a boolean in session that user is logged in .
So once the user and logged in boolean is set in request session, then every request coming from that browser will have those variables available.
Then you can create you JSON based on user and logged in status by retrieving the sessions variables
Below link might help
http://wiki.fasterxml.com/JacksonJsonViews
This has detailed explanation of how to create different views and apply them