# Gong'an fiction

Gong'an or crime-case fiction (Chinese: 公案小说) is a subgenre of Chinese crime fiction involving government magistrates who solve criminal cases. Gong'an fiction first appeared in the colloquial stories of the Song dynasty. Gong'an fiction developed into one of the most popular genres of the Ming and Qing dynasties. The Judge Dee and Judge Bao stories are the best known examples of the genre.

## History

There are no surviving works of Song gong'an, a genre of Song dynasty (10th–13th centuries AD) puppetry and oral performances. Judge Bao stories based on the career of Bao Zheng, a common protagonist of gong'an fiction, first appeared during the Yuan dynasty (13th–14th centuries). Bao was a historical figure who worked for Emperor Renzong of Song as a magistrate. Accounts of his life were recorded in historical documents that later inspired the mythological Judge Bao of gong'an fiction.
The Circle of Chalk (Chinese:灰闌記) is a Yuan zaju play that recounts a Judge Bao criminal case. The popularity of Judge Bao performances contributed to the success of written gong'an novels published in the 16th and 17th centuries. The oldest collection of Judge Bao stories is the Bao Longtu Baijia Gong'an, the Hundred Cases of Judge Bao, also included in the Ming dynasty Bao Gong An (Chinese:包公案).
The popularity of gong'an novels diminished in the early years of the Qing dynasty. It was not until the latter years of the dynasty that the genre experienced a resurgence. During this period of time, Gong'an novels were politicized as a tool of shaping public opinions towards the government. “Wuxia” heroes, also known as martial heroes, rather than acting according to their own code of justice, would often swear loyalty and work in assistance to a government official figure- the initiative of justice derives from the government's actions, not the heroes'. Thematically, the gong'an works of the Qing dynasty mixed elements of traditional gong'an fiction with the wuxia martial arts genre. Qing Judge Bao stories were widespread in every medium, from operas to folk performances and novels. Other magistrates like Judge Peng and Judge Li were also the subject of gong'an works. Shi Gong'an, Judge Shi's Cases, was published in 1798.
In the 1940s, Di Gong An (Chinese:狄公案), an 18th-century collection of gong'an stories, was discovered at a second-hand book store in Tokyo, Japan and translated into English as the Celebrated Cases of Judge Dee by Dutch sinologist Robert Van Gulik in 1949. Van Gulik chose Di Gong An to translate because it was in his view closer to the Western tradition of detective fiction and more likely to appeal to non-Chinese readers. He used the style and characters to write a long running series of Judge Dee books that introduced the gong'an genre to Western audiences as the "Sherlock Holmes of China". The hybrid gong'an and wuxia stories of the Qing dynasty remain popular in contemporary China. Wuxia writer Jin Yong's novels portray more elaborate martial arts and weapons than that of earlier gong'an works.

### Etymology

The term gong'an originally referred to the table, desk, or bench of a Chinese magistrate. It was later used as a name for unusual legal cases. Gong'an as a genre of fiction has been translated into English as "court-case" fiction or "crime-case" fiction. The above etymological development is similar to that of "case" in English - a word which originally described the physical depository where documents of a particular criminal investigation were kept, and later came to refer to the investigation itself.

## Themes and style

The protagonist of gong'an novels is typically a traditional judge or similar official based on historical characters such as Judge Bao (Bao Qingtian) or Judge Dee (Di Renjie). Although the historical characters may have lived in an earlier period (such as the Song or Tang dynasty) most stories are written in the latter Ming or Qing period.
Gong'an novels are characterized by a number of distinct plot elements from other subgenres. The "detective" is the local magistrate who is usually involved in several unrelated cases simultaneously, while the criminal is introduced at the very start of the story and his crime and reasons are carefully explained, thus constituting an inverted detective story rather than a "puzzle". Gong'an stories often have a supernatural element with ghosts contacting the living or even accusing the criminal. The plot can digress into philosophy or a series of official documents. The story may feature a large cast of characters, typically in the hundreds.

### Themes

The Gong'an fiction is a collection of seemingly unrelated short stories, however, they are connected based on their common tropes or crime-related conventions. These stories are usually represented by iconic figures, clothing, and characters. For example: officials, yamen underling, and commoners all wear unique clothing. The depiction of these stories are typically presented to an audience, yet, if the stories are written down, illustrations are used. The stories are generally told by the working magistrate, and involve a number of interrelated crimes occurring early in the story. Although, the stories have a common theme of social justice through punishment; the crimes are generally not didactic. In other words, they are crimes committed against other individuals (murder and rape are common examples) rather than society. The crimes are specific breaches in the law, and punishments are generally also pre-prescribed by law. Although the magistrate may have some supernatural knowledge aiding him in solving the case, he must always establish the facts of the case and prove the criminal guilty.

### Style

Gong'an fiction is very frequently accompanied by illustrations, such as Van Gulik's personal illustration to his Judge Dee novels. A re-occurring theme is the imitation of pictures. This repetition ensures readers have a common understanding of what each illustration represents.
   This convention holds for pre-Ming full-page illustrations as well as shangtu xiawen illustrations. Thus many early sutras feature the Buddha seated on a lotus flower, facing three-quarters left, expounding doctrine or, more likely, the text of the accompanying sutra, while his disciples sit facing him, often with their backs to the reader. Likewise, if the illustration depicts action (many of them have a strong narrative element), the action tends to move from right to left. This is clearly seen in one of Zheng Zhenduo's illustrations, wherein the act of butchering animals is dramatically shown to lead straight to the gates of hell at left by means of a cloud-like cartouche.

## Genre distinctions

Gong'an fiction is part of a broader category of crime-themed fiction, which includes a variety of true crime stories, like those found in the late Ming dynasty story collection The Book of Swindles or in the type of legal case narratives anthologized in Robert E. Hegel's True Crimes in Eighteenth-Century China (2009).
There are multiple differences between Chinese gong'an fiction and western detective fiction. While western detective fiction focuses very much on realism, Chinese gong'an fiction stories may involve supernatural elements such as ghosts or spirits narrating their death, accusing the criminal, or aiding in the delivery of justice. The criminal being introduced at the beginning of the story is characteristic of gong'an fiction. His crime and reasoning are then explained in detail, therefore constituting an inverted detective story. Furthermore, the stories are filled with periodic breaks from the crime story and divert into philosophical lessons and moral practices that are emphasized in more complexed books. These stories contain a large number of characters which are introduced in terms of their relations to the main characters. Moreover, the main characters are often modelled after popular characters from western stories. For example, Di Gong An is chosen by Robert van Gulik for its similarities to Western Detective fiction with the consideration that the western readers will have an easier time to comprehend the stories.

## Modern television series derived from gong'an fiction

Based on traditional gong'an fiction works such as Di Gong An and Justice Bao, many television dramas has been derived to portray the stories with a modern touch. Some notable examples are:
* Amazing Detective Di Renjie 1
* Amazing Detective Di Renjie 2
* Amazing Detective Di Renjie 3
* Da Tang Nu Xun An
* Invincible Knights Errant
* Justice Bao (2008 TV series)
* Justice Bao (2010 TV series)
* Mad Detective Di Ren Jie
* A Pillow Case of Mystery I
* A Pillow Case of Mystery II
* The Three Heroes and Five Gallants (1991 TV Series)
* The Three Heroes and Five Gallants (2016 TV series)
* Young Sherlock (TV series)