public function toJSON(){
        $outcomeValue = null;
        if($this->defaultValue != ''){
            $outcomeValue = Array($this->defaultValue);
        }else if($this->getAttributeValue('baseType') == 'integer' || $this->getAttributeValue('baseType') == 'float'){
            $outcomeValue = Array(0);
        }else{
            $outcomeValue = null;
        }

        $returnValue = taoQTI_models_classes_Matching_VariableFactory::createJSONVariableFromQTIData(
                        $this->getIdentifier()
                        , $this->getAttributeValue('cardinality')
                        , $this->getAttributeValue('baseType')
                        , $outcomeValue
        );

        return $returnValue;
    }
public function toJSON(){
        $outcomeValue = null;
        if($this->defaultValue != ''){
            $outcomeValue = Array($this->defaultValue);
        }else if($this->getAttributeValue('baseType') == 'integer' || $this->getAttributeValue('baseType') == 'float'){
            $outcomeValue = Array(0);
        }else{
            $outcomeValue = null;
        }

        $returnValue = taoQTI_models_classes_Matching_VariableFactory::createJSONVariableFromQTIData(
                        $this->getIdentifier()
                        , $this->getAttributeValue('cardinality')
                        , $this->getAttributeValue('baseType')
                        , $outcomeValue
        );

        return $returnValue;
    }
public function toJSON ( ) { $ outcomeValue = null ; if ( $ this -> defaultValue != '' ) { $ outcomeValue = Array ( $ this -> defaultValue ) ; } else if ( $ this -> getAttributeValue ( 'baseType' ) == 'integer' || $ this -> getAttributeValue ( 'baseType' ) == 'float' ) { $ outcomeValue = Array ( 0 ) ; } else { $ outcomeValue = null ; } $ returnValue = taoQTI_models_classes_Matching_VariableFactory :: createJSONVariableFromQTIData ( $ this -> getIdentifier ( ) , $ this -> getAttributeValue ( 'cardinality' ) , $ this -> getAttributeValue ( 'baseType' ) , $ outcomeValue ) ; return $ returnValue ; }
get the outcome in JSON format

@deprecated now use the new qtism lib for response evaluation
@access public
@author Joel Bout, <joel.bout@tudor.lu>
get the outcome in JSON format