Although Pliny the Younger is regarded as the first author of a ghost story, I think these stories underwent a 360-degree turn during 19th century when Charles Dickens or Oscar Wilde started writing humorous ghost stories. Charles Dickens’ many stories are quite humorous (it may or may not involve the ghost doing funny things exclusively) and Wilde’s "The Canterville Ghost" involves a very weak kind of ghost.
I want to know how and when ghost stories started to become humorous rather than scary? Can it be answered the way Pliny the Younger is credited with ghost stories or Edgar Allan Poe is regarded to have started the detective stories?