diff options
author | Paul Yang <TeBoring@users.noreply.github.com> | 2017-02-08 10:27:54 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-08 10:27:54 -0800 |
commit | cba04b19e88dba2c13241b733bf7f595f1463082 (patch) | |
tree | da61ea725e19eadce400ae17df845e04f36bc608 /php/ext/google/protobuf/protobuf.h | |
parent | c00274313d03a0a7f10e8f6473541faf3739353b (diff) | |
download | protobuf-cba04b19e88dba2c13241b733bf7f595f1463082.tar.gz protobuf-cba04b19e88dba2c13241b733bf7f595f1463082.tar.bz2 protobuf-cba04b19e88dba2c13241b733bf7f595f1463082.zip |
Implement json encoding decoding for php. (#2682)
Diffstat (limited to 'php/ext/google/protobuf/protobuf.h')
-rw-r--r-- | php/ext/google/protobuf/protobuf.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/php/ext/google/protobuf/protobuf.h b/php/ext/google/protobuf/protobuf.h index df452d6f..678f2682 100644 --- a/php/ext/google/protobuf/protobuf.h +++ b/php/ext/google/protobuf/protobuf.h @@ -122,7 +122,10 @@ struct Descriptor { zend_class_entry* klass; // begins as NULL const upb_handlers* fill_handlers; const upb_pbdecodermethod* fill_method; + const upb_json_parsermethod* json_fill_method; const upb_handlers* pb_serialize_handlers; + const upb_handlers* json_serialize_handlers; + const upb_handlers* json_serialize_handlers_preserve; }; extern zend_class_entry* descriptor_type; @@ -261,6 +264,8 @@ const upb_pbdecodermethod *new_fillmsg_decodermethod(Descriptor *desc, PHP_METHOD(Message, encode); PHP_METHOD(Message, decode); +PHP_METHOD(Message, jsonEncode); +PHP_METHOD(Message, jsonDecode); // ----------------------------------------------------------------------------- // Type check / conversion. |