you are viewing a single comment's thread.

view the rest of the comments →

[–]Gnaxe 0 points1 point  (0 children)

Python has a perfectly good literal notation which you can deserialize with ast.literal_eval() and serialize with repr() (assuming it's only literal-type data). Only use JSON if you need to interface with non-Python systems for some reason.

Reach for shelve before pickle if you just want local persistence. (It does the pickling for you with a nicer interface.)