Summary | json_encode(); public, private, protected object properties |
Queue | Horde Framework Packages |
Queue Version | Git master |
Type | Bug |
State | Not A Bug |
Priority | 2. Medium |
Owners | |
Requester | roman (at) stachura (dot) ch |
Created | 01/20/2012 (4929 days ago) |
Due | |
Updated | 11/21/2013 (4258 days ago) |
Assigned | |
Resolved | 11/21/2013 (4258 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Not A Bug
application objects like this. All data to be accessible over the API
should be public. Furthermore, for Horde 6 we need to either always
return hashes from the API, add another RPC-safe API, or otherwise
mark API methods as RPC-safe.
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ json_encode(); public, private, protected object properties
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
Horde_RPC::request(
'jsonrpc',
$rpc_endpoint,
'calendar.listEvents',
$rpc_parameters,
$rpc_options
);
call on the server side the php function json_encode($data);[1]
In the file libs/Horde/Serialize.php on Line 242
The json_encode(); can not serialize protected properties.
Therefore a lot of data get lost.
Either we fix that on the base class level as mentioned here [2]
or we do some fancy regex on the data string [3], before we convert to json.
What do you think of this?
Regards roman
[1] http://php.net/manual/en/function.json-encode.php
[2] http://www.php.net/manual/en/function.json-encode.php#98718
[3] http://www.php.net/manual/en/function.json-encode.php#76215