Peel and dice the pear, removing the core and any stringiness.
Put the pear, sugar, lemon juice, vanilla and cardamom in a small pan and warm over a medium-low heat.
Stir the mixture now and then so that the mixture doesn't burn and the sugar dissolves, but also avoid it going up the sides.
Bring the mixture to a boil and reduce the heat slightly so that it simmers rather than boils. The pear will soften and become more liquid as it heats - break up larger chunks as needed. Cook for around 15 minutes, or more/less as needed, until it becomes noticeably thicker, then remove from heat.
Allow to cool a few minutes before transferring to a sterile jar.