Use json_encode instead of addslashes