You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2014/11/05 05:48:59 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=14197540#comment-14197540 ] 

Hudson commented on THRIFT-2712:
--------------------------------

SUCCESS: Integrated in Thrift #1331 (See [https://builds.apache.org/job/Thrift/1331/])
THRIFT-2712 PHP: add "json" option to create JsonSerializable code (roger: rev 964082a8eb06a5f36eff87132a048cbb3ea5e7a5)
* lib/php/test/Makefile.am
* compiler/cpp/src/generate/t_php_generator.cc
* lib/php/test/Test/Thrift/JsonSerialize/JsonSerializeTest.php
* .gitignore


> 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
>            Assignee: Roger Meier
>            Priority: Minor
>             Fix For: 0.9.2
>
>
> 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)