Minimal serialisation abstractions that let the sampler emit typed values without depending on any specific serialisation format.