I have a products data with products information. It's actually in form of array but I tried to use
Its showing the lines because in the HTML part of the data you have elements which naturally have the line strikethrough style associated with it such as the
But since its a json response and you are sending it as a text/html type the browser renders it all as HTML and since json encode escapes some of the characters in the HTML its showing up a little weird such as some elements aren't closed properly.
I think what you want to do is send this response with the content type set to "json"
Here is how you can do this in php:
header('Content-Type: application/json'); // echo your json content here