Spark is a micro framework for Java[1]. I plan on trying it some time in the future.
get(new Route("/") {
@Override
public Object handle(Request request, Response response) {
Integer age = request.queryMap("user").get("age").integerValue();
//do stuff
}
});
is cleaner and easier to read than this (JAX-RS): @GET @Path("/")
public Response get(@QueryParam("user[age]") Integer age) {
//do stuff
}
It gets far worse if you think about what it takes to marshall a JSON response in spark...