You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to defer some steps, e.g. deserialization of a complex object, until object access time.
This could be accomplished by setting json.load(*, cls=) and returning a collection that defers the object deserialization until a later point.
Unfortunately _replace_refs assumes all mapping types are Dicts and thus the type of the inbound Mapping object is lost.
This could be easily overcome by changing the building of the mapping
obj.class(**{.....})
this would preserve the inbound type that comes from json.load.
The same could be applied to Sequence types.
Obviously this does not apply to the replacement of the referent.
The text was updated successfully, but these errors were encountered:
I would like to defer some steps, e.g. deserialization of a complex object, until object access time.
This could be accomplished by setting json.load(*, cls=) and returning a collection that defers the object deserialization until a later point.
Unfortunately _replace_refs assumes all mapping types are Dicts and thus the type of the inbound Mapping object is lost.
This could be easily overcome by changing the building of the mapping
obj.class(**{.....})
this would preserve the inbound type that comes from json.load.
The same could be applied to Sequence types.
Obviously this does not apply to the replacement of the referent.
The text was updated successfully, but these errors were encountered: