> yeah, i don't see why we need this extension thing. the matching is the task of the routing. what if someone doesnt want to format to be in the extension but something like /json/article and /xml/article.

well that would go beyond what we are doing here. in this case I would recommend to disable this listener and just plain use the routing system to set the route. this listener is about determining the format based on media type + extension which are the "standard" ways to specify the expected output formats.