|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #58664 Add JSON support for serialization
Submitted: 2009-05-07 19:55 UTC Modified: 2012-03-07 17:16 UTC
From: don at smugmug dot com Assigned: andrei (profile)
Status: Closed Package: memcached (PECL)
PHP Version: Irrelevant OS: CentOS 5
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: don at smugmug dot com
New email:
PHP Version: OS:


 [2009-05-07 19:55 UTC] don at smugmug dot com
At least with our datatypes, we're seeing compressed JSON 
result in smaller strings than compressed igbinary (and much 
smaller than compressed serialized PHP).  Plus JSON has the 
added benefit of working in essentially every language.

Would you mind adding JSON as a selectable serializer?

Using json_decode(), we ask it to send an associative array 
back rather than an object.  Possibly a config option if you 
don't want to default to that?



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-24 06:38 UTC] mjs at beebo dot org
This is somewhat undocumented, but (in 1.0 at least) you can 
use the JSON serializer with:


However, as you note, $memcache->get(...) does return an 
object rather than an array even if an array was set() in the 
first place.  I've reported this as bug #16755.
 [2012-03-07 17:16 UTC]
Closing because of age. Please try version 2.0.1 and reopen if this still occurs.
 [2012-03-07 17:16 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 12 22:01:29 2024 UTC