You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Roger Meier (JIRA)" <ji...@apache.org> on 2014/10/08 16:24:33 UTC

[jira] [Assigned] (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:all-tabpanel ]

Roger Meier reassigned THRIFT-2712:
-----------------------------------

    Assignee: Roger Meier

> 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
>
> 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)