Granary_sql.JsonSourceJSON value model and the SQLite json1 scalar functions.
Provides a parsed value tree, text (de)serialisation, type introspection, and the path-based accessors/mutators (path_get, path_set, path_insert, path_replace, path_remove) used to implement the SQL JSON functions.
Parse JSON text into a value, or Error msg on malformed input.
SQL json_type name of a value ("null"/"true"/"integer"/"object"/...).
path_get v p returns the value at JSON path p (e.g. "$.a[0]"), or None if the path does not resolve.
path_set v p x sets the value at path p to x, creating or overwriting as needed (SQL json_set).
path_insert v p x sets path p to x only if it does not already exist (SQL json_insert).
path_replace v p x sets path p to x only if it already exists (SQL json_replace).