public function serialize(UserState $state)
    {
        $saveFile = sprintf('%s/%s', $this->path, static::SAVE_FILE);

        $data = file_exists($saveFile)
            ? $this->readJson($saveFile)
            : [];

        $data[$this->workshopName] = [
            'completed_exercises'   => $state->getCompletedExercises(),
            'current_exercise'      => $state->getCurrentExercise(),
        ];

        return file_put_contents($saveFile, json_encode($data));
    }