Skip to content

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

Open
@velletti

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions