Gong'an or crime-case fiction is a subgenre of Chinese crime fiction involving government magistrates who solve criminal cases. Gong'an fiction first appeared in the colloquial stories of Song dynasty. Gong'an fiction was then developed and become one of the most popular fiction styles in Ming and Qing dynasties. The Judge Dee and Judge Bao stories are the best known examples of the genre.
An actor portraying Bao Zheng reviewing a criminal case in Kaifeng Tribunal (開封府)
Judge Bao in Peking Opera, a frequent protagonist of gong'an novels.
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. The character appeared in the 18th-century Chinese detective and gong'an crime novel Di Gong An. After Robert van Gulik came across it in an antiquarian book store in Tokyo, he translated the novel into English and then used the style and characters to write his own original Judge Dee historical mystery stories.
Judge Dee