HomePhabricator

Provide phutil_json_encode()

Description

Provide phutil_json_encode()

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.

Reviewers: btrahan, joshuaspence

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8672

Differential Revision: https://secure.phabricator.com/D13444

Details

Provenance
epriestleyAuthored on
epriestleyPushed on Jul 7 2015, 12:55 PM
Reviewer
btrahan
Differential Revision
D13444: Provide phutil_json_encode()
Parents
rPHUd8a63d8c2907: Add a `pregsprintf` function
Branches
Unknown
Tags
Unknown
Tasks
T8672: PhabricatorTaskmasterDaemon fatals in PublishWorker