Update serialisations for SPM examples

Applying modifications suggested by @cmaumet.