The character appeared in the 18th-century Chinese detective and gong'an crime novel Di Gong An. Judge Dee, or Judge Di, is a semi-fictional character based on the historical figure Di Renjie, county magistrate and statesman of the Tang court.
Anonymous author credited as 'Buti zhuanren'/novel translated and subsequent novels continued by Robert van Gulik (character based on Di Renjie)