toJson

samples is written only when a run recorded some, so older records keep their bytes.