As my daughter and I approached the Alemany Farmers’ Market, I knew squash blossoms were in our near future. Several people were leaving the market with a crown of poppy-colored petals erupting from their bags. The edible flowers were everywhere, and, like many other shoppers, I couldn’t resist them.

I shop at Alemany because it’s close to my house, and I love being able to walk to what feels like a miniature version of the city. It’s San Francisco’s oldest market, but definitely not the prettiest — it’s bordered by freeways on two sides and consists of long rows of covered concrete stalls. But it’s large, so competition ensures lower prices and lots of variety. It’s where I can find cheap onions or spend a fortune on delta asparagus in spring, where I can get the tiniest manila clams and my pick of summer berries. It’s a place where I almost always see neighbors, people I can gossip with about our kids’ schools or make plans for dinner.

Bypassing the long line at our usual first stop, Tomatero Organic Farm, we checked out Two Dog Farm, a relative newcomer. I bought some of its organic Early Girl tomatoes, as well as purslane, a crunchy, succulent-like green. I then grabbed the first squash blossoms I saw, at Lee Farms from Fresno, which had pumpkin blossoms rather than the more common zucchini flowers. Further along, I picked up floral-scented ambrosia melons and crisp bicolored corn from Brentwood.

Cooking strategy

I planned to stuff the squash blossoms with cheese, batter them and panfry them, and I wanted a crunchy, bracing garnish to accompany them. I love savory salads that incorporate melons — the trick is always balancing out their sweetness. So I decided to pickle the melons and combine them with the other amazing products: sweet corn, the tart tomatoes with their mineral quality, and the crunchy, tangy purslane sprigs. With all those flavors, all the dish needed was olive oil, salt and pepper to finish.

Later, we shared the delicate blossom fritters and salad in the backyard with our neighbors, enjoying what our favorite market offered us on a summer Saturday.

Lightly pickling melons allows you to add savory and spicy flavors while still retaining the melon flavor and texture. Choose melons that are ripe, not overripe, and don’t leave them in the liquid for too long or they’ll get mushy. Purslane is a crunchy green available at many farmers’ markets; substitute with tatsoi or baby spinach.

Pickled Melon Salad

1 2-pound ambrosia or other thin-skinned melon

2 sprigs basil

½ cup white wine vinegar

½ cup apple cider vinegar

½ cup sugar

¼ cup kosher salt

4 black cardamom pods (see Note) or 2 green cardamom pods

8 allspice berries

½ jalapeno, sliced

2 ears corn, shucked

4 Early Girl tomatoes, cut into ¼-inch dice

2 green onions, finely minced

2 cups purslane sprigs

2 tablespoons good extra virgin olive oil

Kosher salt and pepper

Squash Blossoms

4 ounces squash blossoms (12 to 14 large)

3 to 4 ounces Monterey Jack or fontina cheese, cut into ½-inch cubes

1 large egg

½ cup milk

¾ cup all-purpose flour

½ teaspoon kosher salt

Black pepper to taste

Vegetable oil for frying

To make the salad: With a large knife, cut a thin slice from the top and bottom of the melon. Place on a cutting board and use long cuts to remove the skin; it’s fine to leave behind a strip of rind. Seed the melon and cut it into ½-inch cubes. Place in a large canning jar or deep bowl with the basil.

Place the vinegars, sugar, salt, cardamom and allspice in a medium saucepan with 2½ cups water. Bring to a simmer and stir until the sugar and salt are dissolved. Add the jalapeno and let infuse until the liquid has a good spice level, 30 seconds to 1 minute. Remove the jalapeno with a slotted spoon.

Pour the pickling liquid over the melon and let stand until the melon is well spiced and seasoned, about 30 minutes. Reserving a few tablespoons of the pickling liquid, gently drain the melon and let cool. Discard the basil and whole spices.

Steam or boil the corn until tender, about 4 minutes. Remove the kernels with a large, sharp knife. Combine the melon, corn, tomatoes, green onion and purslane in a large bowl. Toss with the olive oil and salt and pepper to taste. If it needs acidity, add a small splash of the pickling liquid.

To make the squash blossoms: Gently rinse the squash blossoms and let dry on clean kitchen towels. Leaving the stems on, gently squeeze each blossom at the base to open and remove the stamen, then stuff with a cube of cheese.

Whisk together the egg and milk in a small bowl. Combine the flour, salt and pepper in another shallow bowl. Holding a blossom by the stem, dip first in the milk mixture, coating fully and then letting the excess drip off. Then gently dip in the flour mixture, sprinkling with flour to cover fully. Shake gently to remove excess flour. (The cheese may fall out; if so, just reinsert it.)

Place a skillet over medium heat and add about ½-inch of oil. When hot, add about 4 blossoms and let cook until browned, about 4 minutes per side; drain on paper towels. Repeat with the remaining blossoms. Serve hot with the melon salad.

Note: Black cardamom is available at well-stocked supermarkets and specialty shops like Spice Ace. It adds a smoky note.

Nutrition information: The calories and other nutrients absorbed from brines vary and are difficult to estimate. Therefore, this recipe contains no analysis.