How to Make It
Trim the watermelon slices, removing the green rind and leaving 1/2 inch of the red flesh on 1/2 inch of the white rind. Cut these pieces into 3/4-inch dice and transfer them to a 1-pint jar.
Bring a saucepan of water to a boil. Add the onions and cook for 2 minutes. Drain the onions, peel them and add them to another 1-pint jar with the corn and the chile. Trim the beans to fit upright in another 1-pint jar. Pack the pear and honeydew into separate 1-pint jars.
In a saucepan, combine the water, sugar, salt, vinegar and star anise, and bring to a boil. Simmer for 10 minutes, then discard the star anise. Return the liquid to a boil and carefully pour it into the jars, filling them to the top. Close the jars and refrigerate overnight or for up to two weeks.