Don't Pickle Your Data
benfrederickson.com
Don't Pickle Your Data
1–10 of 26 posts
Re: Don't Pickle Your Data
#2Re: Don't Pickle Your Data
#3I filed a bug. https://github.com/benfred/bens-blog-code/issues/1
Re: Don't Pickle Your Data
#4I thought pickle output was just JSON? Shows what I know.
Re: Don't Pickle Your Data
#5Re: Don't Pickle Your Data
#6Re: Don't Pickle Your Data
#7You also have to write custom (de)serializers if you want to store datetime objects (my personal pet peeve), any of the special python containers... basically any time you want anything other than an object, array, string or number.
Unless I'm dealing with untrusted data sources, or need to interoperate with other languages, I will keep using Pickle.
Re: Don't Pickle Your Data
#8Re: Don't Pickle Your Data
#9This benchmark doesn't specify a pickle protocol, which forces Python to use a big, inefficient format. I filed a bug. https://github.com/benfred/bens-blog-code/issues/1
Re: Don't Pickle Your Data
#10JSON, while a fantastic lightweight data format, is insufficient for storing even moderately complex objects. It can not properly differentiate between tuples and lists, it can only accept strings for object keys, and it only stores unicode strings. You also have to write custom (de)serializers if you want to store datetime objects (my personal pet peeve), any of the special python containers... basically any time yo…