[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Serializing complex objects

On 21/09/18 17:30, Joseph L. Casale wrote:
> I need to serialize a deep graph only for the purposes of visualizing it to
> observe primitive data types on properties throughout the hierarchy.
> In my scenario, I cannot attach a debugger to the process which would
> be most useful. Using json is not the easiest as I need to chase endless
> custom serialization handlers.
> Does anyone know of something useful in this case?

Depending on what exactly your situation is, you may be able to use the 
pickle module (in the standard library) to dump your graph and reload it 
in a context you can get a debugger into.  Would that be sufficient?

Rhodri James *-* Kynesim Ltd