Dominic: serialisation to json