You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current indentation of pretty printed JSON with json_encode() is using 4 bytes per level.
I feel we are lacking the ability to choose intendation type, i.e. for optimization.
Example:
Tab (1 bytes)
Two spaces (2 bytes)
Four spaces (4 bytes)
Maybe by setting a flag to either:
JSON_PRETTY_PRINT
JSON_PRETTY_PRINT_TABS
JSON_PRETTY_PRINT_DOUBLE_SPACES
I know that we can preg_replace() it the way we want. But why waste resources if we could have it at the core.
mindaugasw, maximal, phcorp, LastDragon-ru, laoneo and 5 moreju1ius and danielmarschall