title: when does json_encode return null
body: <p>I have an api where I return json. json_encode on arrays are returning null. In what cases does json_encode return null? Also what other values does json_encode return to indicate a failure</p>