The historical core is well recorded: Janet was tried for conspiring against the king and burned in 1537, after her family and servants were questioned under torture. Wikipedia's article, citing the historian Jamie Cameron, says that despite the common belief there is no record of a witchcraft charge against her. Ghost guides that call her a witch are repeating a later gloss.
The ghost is the traditional part. Guides say she has been seen many times in the chapel, but they give no named witnesses or dates. A seat in the chapel is reported to be kept empty for her. The story is a good example of a real injustice being given a second life as a castle ghost.
Comments