protected function _encode($model)
 {
     $data = parent::_encode($model);
     switch (get_class($model)) {
         case 'Api\\Model\\Languageforge\\Lexicon\\LexMultiParagraph':
             // convert multiparagraph model to HTML version
             $data = array();
             $data['type'] = LexConfig::MULTIPARAGRAPH;
             $data['inputSystem'] = $model->inputSystem;
             $data['paragraphsHtml'] = $model->toHTML();
             break;
     }
     return $data;
 }
 /**
  * Sets key/values in the array from the public properties of $model
  * @param object $model
  * @return array
  */
 public static function encode($model)
 {
     $encoder = new JsonEncoder();
     return $encoder->_encode($model);
 }