protected static function _endString(&$encode, $position, &$pos)
 {
     do {
         $position = strpos($encode, '"', $position + 1);
     } while ($position !== false && GantryJSON::_slashedChar($encode, $position - 1));
     if ($position === false) {
         JError::raiseWorning(500, 'Invalid JSON');
     }
     return $position - $pos;
 }