Put the blackberries in a small bowl. In another small bowl, combine the caster sugar, salt and white wine vinegar, then pour it over the fruit. Leave for at least 15 minutes.
Fill a cocktail shaker with ice, add a dash of dry vermouth, stir, then drain away almost all the liquid (or leave it in if you prefer your martini ‘wet’). Pour in the gin, stir well, then strain into a martini glass or coupe.
Add 1 tbsp of the pickling liquid, then garnish with one of the pickled blackberries and a thyme sprig.