Fix #66021 (Blank line inside empty JSON array/object) #518

Merged
merged 1 commit into from Apr 14, 2014

Conversation

Projects
None yet
3 participants
Contributor

plstand commented Nov 2, 2013

Changed json_encode() so that when the JSON_PRETTY_PRINT option is specified, the pair of linefeeds immediately after an opening bracket and before the corresponding closing bracket is omitted when the array or object contains no elements or accessible properties (and hence would have a blank line between the brackets).

@plstand plstand Fix #66021 (Blank line inside empty array/object)
Changed json_encode() so that when the JSON_PRETTY_PRINT option is specified,
the pair of linefeeds immediately after an opening bracket and before the
corresponding closing bracket is omitted when the array or object contains no
elements or accessible properties (and hence would have a blank line between
the brackets).
82a4f1a

plstand changed the title from Fix #66021 (Blank line inside empty array/object) to Fix #66021 (Blank line inside empty JSON array/object) Apr 7, 2014

mnapoli commented Apr 7, 2014

+1 for more readable pretty prints!

php-pulls merged commit 82a4f1a into php:PHP-5.4 Apr 14, 2014

plstand deleted the unknown repository branch Sep 2, 2014

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