Surprisingly many questions on the Scala Stack Overflow are related to the issues with ambiguity during implicits resolution. Indeed if one breaks the basic implicit scope management rules, it’s very easy to fall into the ambiguity trap. One source of such issues is the Spray toolkit, which has a routing DSL that heavily depends on Scala’s implicit mechanism. Unfortunately, some of these issues are not very clear, especially when working with its json library and Scala’s compiler doesn’t help us much. In todays post I’d like to take a deeper look at this problem, why it occurs and how we can solve it.