JSON store (Tier 1)
Key-value storage for simple state — preferences, flags, cached values. Access via
sdk.json.
Methods
Section titled “Methods”get<T>(key: string): Promise<T | null>set<T>(key: string, value: T): Promise<void>update<T>(key: string, fn: (prev: T | null) => T): Promise<T>delete(key: string): Promise<boolean>exists(key: string): Promise<boolean>list(): Promise<string[]>clear(): Promise<void>Examples
Section titled “Examples”await sdk.json.set('prefs', { theme: 'dark', fontSize: 14 });const prefs = await sdk.json.get('prefs');
// Atomic incrementconst next = await sdk.json.update('counter', n => (n || 0) + 1);
const keys = await sdk.json.list();Manifest
Section titled “Manifest”Declare every key you use:
<script type="shareout/manifest">{ "version": "2.0", "sources": { "json": { "prefs": { "default": { "theme": "light" } }, "counter": { "default": 0 } } }}</script>Reach for tables when you need many structured records with filtering instead of a single value.