Jersey’s Entity Filtering meets Jackson

Support for Entity Filtering in Jersey introduces a convenient facility for reducing the amount of data exchanged over the wire between client and server without a need to create specialized data view components. The main idea behind this feature is to give you means that will let you selectively filter out any non-relevant data from the model before sending the data to the other party.

Entity Data Filtering is not a new feature but so far the support was limited to MOXy JSON provider. Since Jersey 2.16, we support also Jackson (2.x) JSON processor and in this article we’re going to take a look into it in more detail.

Continue reading Jersey’s Entity Filtering meets Jackson

Jersey 2.6 has been Released: New and Noteworthy

As some of you may have already noticed, we’ve recently released Jersey 2.6 (Reference Implementation of JAX-RS – Java API for RESTful Web Services). In this article I’d like to introduce some of the new features, important bug fixes and other noteworthy changes.

Continue reading Jersey 2.6 has been Released: New and Noteworthy

JSON in Query Params or How to Inject Custom Java Types via JAX-RS Parameter Annotations

Although I am not a big fan of sending JSON in other places than in the message body as the entity, for example in query parameter in case of requests, it’s not a rare use-case and the way how it can be solved in JAX-RS 2.0 gives me a nice opportunity to illustrate usage of two new interfaces, ParamConverterProvider and ParamConverter. You can then re-use this approach to inject other media-types or formats your application relies on via @*Param annotations (@MatrixParam, @QueryParam, @PathParam, @CookieParam, @HeaderParam).

Continue reading JSON in Query Params or How to Inject Custom Java Types via JAX-RS Parameter Annotations