I am sending an AJAX request expecting JSON response. However, the returned JSON is preceded with a red dot\bullet which is causing a parse error.
Here is a screenshot from Postman
:
The dot is not shown on Raw
or Preview
display, only on Pretty
.
In Chrome Dev Tools Network tab it appears under Response
. Preview
is shown normally as if the dot isn't there.
I was faced red dots problem in my ajax response I tried a lot of solution but doest work for me after then I tried ob_clean() function I got the solution I solved my problem using ob_clean() inside the constructor method
function __construct()
{
ob_clean();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With