Page MenuHomePhabricator

Provide phutil_json_encode()
ClosedPublic

Authored by epriestley on Jun 25 2015, 5:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 13, 6:16 PM
Unknown Object (File)
Mon, Oct 7, 1:34 AM
Unknown Object (File)
Wed, Oct 2, 2:09 AM
Unknown Object (File)
Wed, Sep 25, 6:39 AM
Unknown Object (File)
Fri, Sep 20, 5:39 PM
Unknown Object (File)
Fri, Sep 20, 2:39 PM
Unknown Object (File)
Fri, Sep 20, 2:37 PM
Unknown Object (File)
Fri, Sep 20, 2:36 PM
Subscribers
Tokens
"Like" token, awarded by shrinidhirao.

Details

Summary

Ref T8672. Various issues like T8672 and T5955 are more difficult to understand and debug because we are not careful about checking for JSON encoding errors.

Add an error checking JSON encoder. This will let us raise an issue at the source of the problem, instead of further down the pipeline.

Test Plan

Added and executed unit tests.

Diff Detail

Repository
rPHU libphutil
Branch
json1
Lint
Lint Errors
SeverityLocationCodeMessage
Errorsrc/utils/utils.php:1187XHP45PHP Compatibility
Errorsrc/utils/utils.php:1187XHP45PHP Compatibility
Unit
Tests Passed
Build Status
Buildable 7013
Build 7081: [Placeholder Plan] Wait for 30 Seconds
Build 7080: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Provide phutil_json_encode().
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: btrahan, joshuaspence.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Jun 25 2015, 7:44 PM

Feel free to land this without me, but I'd like to take a look probably tomorrow.

I'm probably going to wait until I promote to stable to get serious about this.

This revision was automatically updated to reflect the committed changes.