You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2014/10/02 13:28:34 UTC
[jira] [Commented] (THRIFT-2712) PHP: add "json" option to create
JsonSerializable code
[ https://issues.apache.org/jira/browse/THRIFT-2712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14156386#comment-14156386 ]
ASF GitHub Bot commented on THRIFT-2712:
----------------------------------------
Github user hcorg commented on the pull request:
https://github.com/apache/thrift/pull/219#issuecomment-57614754
https://issues.apache.org/jira/browse/THRIFT-2712
> PHP: add "json" option to create JsonSerializable code
> ------------------------------------------------------
>
> Key: THRIFT-2712
> URL: https://issues.apache.org/jira/browse/THRIFT-2712
> Project: Thrift
> Issue Type: New Feature
> Components: PHP - Compiler
> Reporter: Stig Bakken
> Priority: Minor
>
> This patch adds a "json" option to PHP code generation that will make generated classes implement JsonSerializable, so thrift objects may be converted to json using json_encode() easily. If the "validate" option is enabled, the object's write validator will be called, beyond that the jsonSerialize() method only outputs non-null fields in the JSON object (JSON parsers get grumpy if you send them null where they expect to see a number).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)