public function serialize(Answer $answer, array $options = [])
    {
        $serialized = [
            'id' => $answer->getUuid(),
            'questionId' => $answer->getQuestionId(),
            'tries' => $answer->getTries(),
            'usedHints' => array_map(function ($hintId) use ($options) {
                return $options['hints'][$hintId];
            }, $answer->getUsedHints()),
        ];

        if (!empty($answer->getData())) {
            $serialized['data'] = json_decode($answer->getData(), true);
        }
        // Adds user score
        if (in_array(Transfer::INCLUDE_USER_SCORE, $options)) {
            $serialized = array_merge($serialized, [
                'score' => $answer->getScore(),
                'feedback' => $answer->getFeedback(),
            ]);
        }

        return $serialized;
    }