KeyValueDatabase · Newtonsoft Bridge

com.cupkekgames.keyvaluedatabases.newtonsoft — Newtonsoft bindings for com.cupkekgames.keyvaluedatabases. A JsonConverter that (de)serializes KeyValueDatabase<TKey, TValue> through its public Pairs list, so the core package stays serializer-agnostic (it has no Newtonsoft awareness of its own).

Mirrors the Data ↔ Newtonsoft bridge pattern: the core type's dictionary is a derived runtime cache, and the pairs list is the serialized source of truth. Without this bridge a reflection serializer would emit the database's computed members (Count / Keys / Values) instead of round-tripping the data.

What's inside

  • KeyValueDatabaseConverter — a JsonConverter that handles the open generic KeyValueDatabase<,>, so every closed type is covered with no per-type registration. Writes the Pairs list; on read, sets Pairs (whose setter invalidates the cache so the dictionary rebuilds on next access).
  • KeyValueDatabasesSerializationTypeProviderSO — a SerializationTypeProviderSO that supplies the converter to the SerializationManager. Create via Assets ▸ Create ▸ CupkekGames ▸ Data ▸ Newtonsoft ▸ KeyValueDatabase Type Provider.

Usage

Add a KeyValueDatabasesSerializationTypeProviderSO asset to your SerializationManagerRegistrar's providers list. Once registered, any KeyValueDatabase<,> field round-trips through Newtonsoft automatically — no per-type setup.

Asmdef + namespace

CupkekGames.KeyValueDatabases.Newtonsoft (runtime).

Dependencies

  • com.cupkekgames.keyvaluedatabases (UPM, ≥ 0.2.0 — the Pairs accessor this converter relies on)
  • com.cupkekgames.newtonsoft (UPM)

Repository

Cupkek-Games/CupkekGames-KeyValueDatabases-Newtonsoft

Settings

Theme

Light

Contrast

Material

Dark

Dim

Material Dark

System

Sidebar(Light & Contrast only)

Light
Dark

Font Family

DM Sans

Wix

Inclusive Sans

AR One Sans

Direction

LTR
RTL