Skip to content
This repository has been archived by the owner on May 1, 2021. It is now read-only.

json pretty print for superuser #7

Open
markosiilak opened this issue Feb 27, 2020 · 3 comments
Open

json pretty print for superuser #7

markosiilak opened this issue Feb 27, 2020 · 3 comments

Comments

@markosiilak
Copy link

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);

@thomasaull
Copy link
Owner

thomasaull commented Feb 27, 2020

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?

@markosiilak
Copy link
Author

Thanks, for answer. It's a just a idea.
Im using superuser for api testing and its better if json result for superuser is not in one row :)

@thomasaull
Copy link
Owner

thomasaull commented Feb 27, 2020 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants