News for hackers. Stuff that matters.
Re:Don't Pickle Your Data by staticfish on Wednesday February 12, 2014 @02:49PM (#7226817)
I thought pickle output was just JSON? Shows what I know.
Re:Don't Pickle Your Data by herge on Wednesday February 12, 2014 @03:08PM (#7226933)
If it was JSON, how would you pickle dictionaries with tuples as keys?
Re:Don't Pickle Your Data by habitue on Wednesday February 12, 2014 @09:03PM (#7228861)
The same way you would in JavaScript: turn it into a string first. "(1, 2)" Its not that serializing python objects to json is impossible, just that there is not a straightforward implementation that everyone agrees is correct.

For a fully general python <-> json serializer/deserializer, you'd need a bunch of extra annotations etc that would make it look very weird compared with what most people expect when they think of json.