core/versioned_json_store library
Classes
-
VersionedJsonStore<
T> - A thin, versioned JSON object store on top of StorageService's plain key-value strings — for save data with actual shape (player profile, level progress) that needs to survive a schema change between game versions without losing old players' data.
-
VersionedSyncConflict<
T> - Both sides of a genuine VersionedJsonStore.syncWith conflict — local and cloud both have DIFFERENT data (see VersionedJsonStore.syncWith's own doc for exactly when this is raised), so picking a winner by timestamp alone risks silently discarding real progress from whichever device loses.
-
VersionedSyncConflictResolution<
T> -
What an
onConflicthandler decided to do about a VersionedSyncConflict — built via one of the 3 named constructors, never directly. -
VersionedSyncConflictSide<
T> -
One side (local or cloud) of a VersionedSyncConflict — the parsed value plus
the
syncedAtMstimestamp it was saved under.
Enums
- VersionedSyncConflictStrategy
- Which side VersionedSyncConflictResolution picked.
Typedefs
-
VersionedSyncConflictHandler<
T> = VersionedSyncConflictResolution< T> Function(VersionedSyncConflict<T> conflict) - Caller-supplied conflict handler for VersionedJsonStore.syncWith — see that method's doc for exactly when this is invoked, and its exception-safety contract.