lib/Weasel/JsonMarshaller/JsonMapper.php
public function writeString($data, $type = null)
    {
        if (!isset($type)) {
            $type = $this->_guessType($data);
        }
        return $this->_encodeValue($data, $this->_parseTypeString($type));
    }
public function writeString($data, $type = null)
    {
        if (!isset($type)) {
            $type = $this->_guessType($data);
        }
        return $this->_encodeValue($data, $this->_parseTypeString($type));
    }
public function writeString ( $ data , $ type = null ) { if ( ! isset ( $ type ) ) { $ type = $ this -> _guessType ( $ data ) ; } return $ this -> _encodeValue ( $ data , $ this -> _parseTypeString ( $ type ) ) ; }
Serialize an data to a string of JSON.
@param mixed $data Data to serialize
@param string $type Type of the data being encoded. If not provided then this will be guessed.
Guessing only works with primitives and simple objects.
@return string The JSON
Serialize an data to a string of JSON .