Page MenuHomePhabricator

Provide phutil_json_encode()
ClosedPublic

Authored by epriestley on Jun 25 2015, 5:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 25, 1:39 PM
Unknown Object (File)
Mon, Mar 25, 1:39 PM
Unknown Object (File)
Sun, Mar 24, 4:49 PM
Unknown Object (File)
Wed, Mar 20, 4:42 PM
Unknown Object (File)
Sun, Mar 17, 9:07 PM
Unknown Object (File)
Sun, Mar 17, 8:52 PM
Unknown Object (File)
Sun, Mar 17, 8:43 PM
Unknown Object (File)
Sun, Mar 17, 5:19 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.