Python's cPickle deserialization from PHP?
Posted
by Ciantic
on Stack Overflow
See other posts from Stack Overflow
or by Ciantic
Published on 2010-06-14T20:58:14Z
Indexed on
2010/06/14
21:02 UTC
Read the original article
Hit count: 218
Hi!
I have to deserialize a dictionary in PHP that was serialized using cPickle in Python.
In this specific case I probably could just regexp the wanted information, but is there a better way? Any extensions for PHP that would allow me to deserialize more natively the whole dictionary?
Apparently it is serialized in Python like this:
import cPickle as pickle
data = { 'user_id' : 5 }
pickled = pickle.dumps(data)
print pickled
Contents of such serialization cannot be pasted easily to here, because it contains binary data.
© Stack Overflow or respective owner