vibe.state_serializer

Serialize and deserialize NestedValue state for persistence.

rehydrate_parents

rehydrate_parents(root_value: NestedValue) -> None

Rehydrate the _parent attributes in a NestedValue tree after deserialization.

Parameters:
  • root_value (NestedValue) –

    The root NestedValue node to start rehydration from

to_json_dict

to_json_dict(obj: object) -> object

STRICTLY converts a Python object to a JSON-serializable dictionary.

Raises TypeError for any object type not explicitly handled.

from_json_dict

from_json_dict(data: object) -> object

Recursively converts a JSON-serializable dict back into Python objects.

Uses registries to reconstruct custom types.