Juniper foliage and “berries” have been used for ages as a medicinal, in the production of gin, and for some (rats) as a primary food source. Juniper berries and foliage contain many secondary plant products – including terpenes or essential oils which provide some degree of protection against invasive organisms (bacteria for example) and herbivores. In a great example of what may be toxic for some, but not others, the enhanced capacity for some desert woodrats known to feed almost exclusively on juniper is thanks in part to their complement of detoxification enzymes, and more specifically those known as CYPs or cytochrome P450s. The CYP enzyme superfamily stands out as one of the most comprehensive chemical defensive systems known in animals. And plants provided much of the environmental selection pressure responsible for the evolution of large branches of the CYP family tree. In other words, we have plants to thank for our ability to readily metabolize and detoxify many dozens if not hundreds of plant chemicals, pharmaceuticals and even synthetic chemicals.
For one of the earlier studies on CYP in juniper-eating woodrats, see “Liver biotransforming enzymes in woodrats Neotoma stephensi (Muridae)” by John G. Lamb et al., 2004 published in Comparative Biochemistry and Physiology Part C: Toxicology & Pharmacology Volume 138, Issue 2, June 2004, Pages 195–201, and here.