In a REST method to return, for example, a /users/{userID} endpoint, I want to control what fields are returned. For example, anyone can see a basic subset of fields of User record, but a logged-in user can see a larger subset of fields.
What's the intended way, in Baratine, to control what subset of information is relayed? Is it to create different POJOs representing the field sets? This seems cumbersome, and prone to a lot of class proliferation.
Is there a way to create simple dictionaries that can be rendered as JSON in a result? Is there a way to render an Object to JSON, but to limit which fields are rendered?
--
Rick Mann
rm...@latencyzero.com