Disney's 1940 animated classic, Pinocchio, is loosely based on a novel called “The Adventures of Pinocchio” by Carlo Collodi. Collodi originally published the story as a serial in a children's newspaper during 1881 and 1882. The titular character was an unrepentant rogue who was harshly punished in diverse ways, and the first iteration of the story ended with his death by hanging for his numerous crimes.
However, at the request of his publisher, Collodi continued the story in the novel to make it more child-friendly. The Fairy with the Turquoise Hair (called 'The Blue Fairy' by Disney) rescues Pinocchio and helps him redeem himself by the end of the book by caring for his father.
More about Pinocchio: