The story is about a really sweet girl who lives near a swamp. There is also a boy who likes the girl. There is a bad guy, I think his name was Black Jack or something like that, who wants to do something bad in or to the swamp. He ends up being killed by a rattlesnake and when they find him the snake is already eating one of his legs. I read this book the first time when I was in elementary school.
The story isn’t mostly about the girl, although she features heavily. This is ‘Freckles’ by Gene Stratton Porter.https://en.wikipedia.org/wiki/Freckles_(novel)
I don’t remember the book well but could this be from Stratton’s Girl of the Limberlost?
Just what I thought, Sue!
It’s available for free at Project Gutenberg, in a variety of formats. Just Google:
project gutenberg freckles stratton
Agreed – probably “Girl of the Limberlost” by Gene Stratton Porter