anchor.diff:  package org.acme.rest.json;
   
   import java.util.Collections;
  -import java.util.LinkedHashMap;
  +import java.util.LinkedHashSet;
   import java.util.Set;
   
   import javax.ws.rs.Consumes;
  
positive.code: @Consumes(MediaType.APPLICATION_JSON)
  public class LegumeResource {
  
      private Set<Legume> legumes = Collections.newSetFromMap(Collections.synchronizedMap(new LinkedHashMap<>()));
  
      public LegumeResource() {
          legumes.add(new Legume("Carrot", "Root vegetable, usually orange"));
  
negative.code: 
  This time, you can see our list of legumes.
  
  == HTTP filters and interceptors
  
  Both HTTP request and response can be intercepted by providing `ContainerRequestFilter` or `ContainerResponseFilter`
  implementations respectively. These filters are suitable for processing the metadata associated with a message: HTTP
  headers, query parameters, media type, and other metadata. They also have the capability to abort the request
  processing, for instance when the user does not have the permissions to access the endpoint.
  
  Let's use `ContainerRequestFilter` to add logging capability to our service. We can do that by implementing
  `ContainerRequestFilter` and annotating it with the `@Provider` annotation:
  
  [source,java]
  ----
  package org.acme.rest.json;
  
  import javax.servlet.http.HttpServletRequest;
  import javax.ws.rs.container.ContainerRequestContext;
  import javax.ws.rs.container.ContainerRequestFilter;
  import javax.ws.rs.core.Context;
  import javax.ws.rs.core.UriInfo;
  import javax.ws.rs.ext.Provider;
  
  import org.jboss.logging.Logger;
  
  
  @Provider
  public class LoggingFilter implements ContainerRequestFilter {
  
      private static final Logger LOG = Logger.getLogger(LoggingInterceptor.class);
  
      @Context
      UriInfo info;
  
      @Context
      HttpServletRequest request;
  
      @Override
      public void filter(ContainerRequestContext context) {
  
          final String method = context.getMethod();
          final String path = info.getPath();
          final String address = request.getRemoteAddr();
  
          LOG.infof("Request %s %s from IP %s", method, path, address);
      }
  }
  ----
  
  Now, whenever a REST method is invoked, the request will be logged into the console:
  
  [source,shell]
  ----
  2019-06-05 12:44:26,526 INFO  [org.acm.res.jso.LoggingFilter] (executor-thread-1) Request GET /legumes from IP 127.0.0.1
  2019-06-05 12:49:19,623 INFO  [org.acm.res.jso.LoggingFilter] (executor-thread-1) Request GET /fruits from IP 0:0:0:0:0:0:0:1
  2019-06-05 12:50:44,019 INFO  [org.acm.res.jso.LoggingFilter] (executor-thread-1) Request POST /fruits from IP 0:0:0:0:0:0:0:1
  2019-06-05 12:51:04,485 INFO  [org.acm.res.jso.LoggingFilter] (executor-thread-1) Request GET /fruits from IP 127.0.0.1
  ----
  
  
  == Conclusion
  
  Creating JSON REST services with Quarkus is easy as it relies on proven and well known technologies.
  