Parse JSON safely without throwing