|
|
|
|
|
by Spivak
1403 days ago
|
|
People really don’t get what pickle does apparently. The on disk format (could be JSON) is irrelevant. I guess you could say JSON is pickle but restricted to only primitive types. The hard part is deciding what an to_json and from_json should be for an arbitrary Python object. That pair of methods is the pickle part. “just write custom serializers for all objects you want to store to and load from disk and then invent a tagging system so you can keep track of what classes they were” is a surprisingly valid solution but it’s still different. |
|