Skip to content
#0773
Sqlite

Update one field inside the JSON, not the JSON

Your app stores each user's settings as one JSON document. A user toggles dark mode. On a document store, you fetch the blob, patch it client-side, write it back, and hope nobody changed notifications.email in between. Here you send PUT /kv/user:4711?path=settings.theme with the body "dark". The store updates that one nested field in place.

Reads work the same way: GET with ?path=settings.notifications.email returns the value, not the whole document. No read-modify-write cycle, no partial-update SDK, no revision juggling. The key holds a document; the URL addresses a field inside it. You stop shipping the whole object across the wire to change one boolean.

A query parameter reaches inside the value.