plugin/exo/Serializer/Misc/KeywordSerializer.php
public function serialize(Keyword $keyword, array $options = [])
    {
        $serialized = [
            'text' => $keyword->getText(),
            'caseSensitive' => $keyword->isCaseSensitive(),
            'score' => $keyword->getScore(),
        ];

        if ($keyword->getFeedback()) {
            $serialized['feedback'] = $keyword->getFeedback();
        }

        return $serialized;
    }
public function serialize(Keyword $keyword, array $options = [])
    {
        $serialized = [
            'text' => $keyword->getText(),
            'caseSensitive' => $keyword->isCaseSensitive(),
            'score' => $keyword->getScore(),
        ];

        if ($keyword->getFeedback()) {
            $serialized['feedback'] = $keyword->getFeedback();
        }

        return $serialized;
    }
public function serialize ( Keyword $ keyword , array $ options = [ ] ) { $ serialized = [ 'text' => $ keyword -> getText ( ) , 'caseSensitive' => $ keyword -> isCaseSensitive ( ) , 'score' => $ keyword -> getScore ( ) , ] ; if ( $ keyword -> getFeedback ( ) ) { $ serialized [ 'feedback' ] = $ keyword -> getFeedback ( ) ; } return $ serialized ; }
Converts a Keyword into a JSON-encodable structure.

@param Keyword $keyword
@param array   $options

@return array
Converts a Keyword into a JSON - encodable structure .