Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Option "json_pretty_print" to format json Encode ViewHelpder #1571

Open
velletti opened this issue Feb 27, 2019 · 0 comments · May be fixed by #1606
Open

add Option "json_pretty_print" to format json Encode ViewHelpder #1571

velletti opened this issue Feb 27, 2019 · 0 comments · May be fixed by #1606

Comments

@velletti
Copy link

It youd be nice to have

in this line
https://github.com/FluidTYPO3/vhs/blob/development/Classes/ViewHelpers/Format/Json/EncodeViewHelper.php#L131
the possablity to format the Output:
$json = json_encode($value, JSON_HEX_AMP | JSON_HEX_QUOT | JSON_HEX_APOS | JSON_HEX_TAG | JSON_PRETTY_PRINT );

May as an Optional argument like "Options" so the json_encode() is called like 👍

$json = json_encode($value, JSON_HEX_AMP | JSON_HEX_QUOT | JSON_HEX_APOS | JSON_HEX_TAG $options );

neufeind added a commit to neufeind/vhs that referenced this issue Oct 18, 2019
Optionally add JSON_PRETTY_PRINT to json_encode-options.

Resolves: FluidTYPO3#1571
neufeind added a commit to neufeind/vhs that referenced this issue Oct 18, 2019
Optionally add JSON_PRETTY_PRINT to json_encode-options.

Resolves: FluidTYPO3#1571
neufeind added a commit to neufeind/vhs that referenced this issue Oct 18, 2019
@neufeind neufeind linked a pull request Oct 18, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant