-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Often times, it's useful to rename classes to make their intent more clear as your application design evolves along with new requirements.
In order to allow applications to smoothly transition their serialized data model to new versions, it would be interesting to support parsing fallback logic that would allow @arborjs/json to deserialize data mapping it to the correct data type even when the serialized type is no longer available in runtime, due to renaming.
Ideas:
@serializableWithFallback("MyTodo", "NewTodo")
class Todo {
}We could also look into providing a more generic decorator that would support various configuration options:
@serialize({
as: "Todo",
from: ["MyTodo", "NewTodo"]
})
class Todo {
}Metadata
Metadata
Assignees
Labels
No labels