public function toJSON ($attributes = FALSE, $addClass = FALSE)
	{
		
		// Get array
		
		$arr	= $this->toArray ($attributes);
		
		// Add the class name if required
		
		if ($addClass)
		{
			$arr['class']	= str_replace ('\\', '_', str_replace ('sonic\\model\\', '', strtolower (get_called_class ())));
		}
		
		// Return json encoded
		
		return json_encode ($arr);
		
	}