Ändra raden $json['news'][]=$row;
till $json['news'][]=array_map('utf8_encode', $row);
löste problemet. Det finns karaktärer som ä, ö.... i databastabellen.
$con=mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$sql = "SELECT `titel` FROM `news` ORDER BY `datum` DESC";
$result = mysql_query($sql);
$json = array();
if(mysql_num_rows($result)){
while($row=mysql_fetch_assoc($result)){
$json['news'][]=array_map('utf8_encode', $row);
}
}
mysql_close($con);
echo json_encode($json);