This repository has been archived by the owner on May 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
json pretty print for superuser #7
Comments
Hmm I don't think so. I could make the relevant method hookable though. Care to create a PR for that? :) On the other hand, what is your use case for echoing pretty printed json? The browsers usually do that on their own, don't they? |
Thanks, for answer. It's a just a idea. |
Do you know if there‘s any downside of using pretty print in general for all API responses?
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is ther a way for using pretty print without changing your RestApi/Router.php file?
Example:
if (wire('roles')->get("name=superuser")) { $beauty = JSON_PRETTY_PRINT; } echo json_encode($return, $beauty);
The text was updated successfully, but these errors were encountered: