Homec4science

Fix libphutil's readable JSON serializer for empty arrays

Authored by epriestley <git@epriestley.com> on Nov 16 2011, 19:13.

Description

Fix libphutil's readable JSON serializer for empty arrays

Summary: The range() test has a bad edge case for empty arrays and caused us to
encode them as '{}' instead of '[]'. Using '[]' is more consistent with PHP's
behavior.

Test Plan: Ran unit test.

Reviewers: btrahan, jungejason, nh, tuomaspelkonen, aran

Reviewed By: btrahan

CC: aran, btrahan

Differential Revision: 1119

Details

Committed
epriestley <git@epriestley.com>Nov 17 2011, 23:02
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUc4b803bc7d95: Don't link "self::" and "parent::" as symbols in PhutilXHPASTSyntaxHighlighter
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHUfb58b0a90af8: Fix libphutil's readable JSON serializer for empty arrays (authored by epriestley <git@epriestley.com>).Nov 17 2011, 23:02