In which dynasty was Shan Hai Jing written?

Shan Hai Jing was written from the Warring States Period to the early Han Dynasty.

The Classic of Mountains and Seas is a strange book in ancient China, whose author is unknown. It was written from the Warring States Period to the early Han Dynasty, and it is also called the three wonderful books in ancient times together with The Book of Changes and Huangdi Neijing. This book 18, and the rest chapters are earlier. The original ***22 articles, about 32650 words. * * * There are 5 Tibetan Mountain Classics, 4 overseas Classics, 5 domestic Classics and 4 Wild Classics. The content is mainly geographical knowledge in folklore, including mountains and rivers, truth, nationalities, products, medicine, sacrifices, witch doctors and so on. It has preserved many famous ancient myths, legends and fables, including Kuafu's day by day, Goddess's mending the sky, Jingwei's reclamation and Dayu's harnessing the water.

Sima Qian first mentioned Shan Hai Jing. In the Biography of Historical Records in Dawan, he said that the contents in Yu Benji and Shan Hai Jing were too absurd to be used as a reference in making history. Liu Xin, the first person in the Western Han Dynasty to sort out the Classic of Mountains and Seas, thinks that this book was written in the Three Dynasties in his Table of Mountains and Seas.