[Baypiggies] newbie question - json as pickler

K. Richard Pixley rich at noir.com
Mon Feb 22 16:35:11 CET 2010

Keith Dart wrote:
> Right. If you want Python-to-Python transfers why not use pickle?
> The default format IS text, and is actually readable once you learn a
> little of the format.
Interesting.  I was using pickle.HIGHEST_PROTOCOL which isn't text.  Thanks.
> I don't think you should be trying to slice the serialized byte stream
> since it is supposed to be opaque data.
> You can pickle arbitrary objects. The main limitation there is that
> class instances don't pickle the whole class, but refer to the class by
> name.
> However, if all you want to transfer and/or store are basic data types
> then JSON serialization could work. It is possible to extend it with a
> custom hack to transfer more complex types, but it won't be portable.
Understood.  And in my case, that's fine.  I'll be the only producer and 
the only consumer.


More information about the Baypiggies mailing list