-1
This view is the responsibility of the browser when it receives a JSON response from the server. Not all browsers display it like this.
For example, when accessing https://jsonplaceholder.typicode.com/users in Firefox is displayed:
Already in Chrome is displayed:
What makes this view enabled in Firefox is the header Content-Type
of the server response, when it indicates that it is a JSON response.
So to enable this view in Firefox just send the JSON reply:
<?php
header('Content-Type: application/json');
echo json_encode(...);
echo json_encode($json,JSON_PRETTY_PRINT); you are looking for?
– Bruno H.
echo json_encode($json) the JSON_PRETTY_PRINT is to make it more beautiful, only I don’t have time to explain in a reply, but there are some other possible parameters to make the formatting more beautiful
– Bruno H.
@Brunoh. I think you can’t understand if I give the command it returns me ""{"1":"to"}"" and I wanted it to return equal to the image below
– user166789