But if you follow the link to the Wikipedia page for the Pentamerone, the collection in which Sun, Moon, and Talia appears, you get this:
> The stories in the Pentamerone were collected by Basile and published posthumously
It's clear, once again, that while he may have embellished them for publication, he was not creating them out of whole cloth, but collecting them from folk tales in his area.
It is far from clear, which is why I am pointing out that some folklorists think it does not come from folk tradition.
Regarding Basile, see long argument starting from page 75 in this book: http://www.academia.edu/19594654/A_FAIRY_TALE_NEW_HISTORY_Ru...
Chapter 4:
The Two Inventors of Fairy Tale Tradition
Giambattista Basile (1634–1636) and Giovan Francesco Straparola (1551, 1553)
Perrault's Sleeping Beauty was actually a retelling of this literary fairy tale: https://en.wikipedia.org/wiki/Sun,_Moon,_and_Talia