Bunny Database includes SQLite’s full JSON function set. See the SQLite JSON documentation.
Every scalar function that returns JSON has a jsonb_ sibling, such as jsonb_set() or jsonb_array(). It behaves the same but returns SQLite’s binary JSONB format instead of text. JSONB is faster to query, so prefer it for values you store and read often.
Build and validate
json() accepts JSON5 input, such as unquoted keys, single quotes, comments, hex numbers, and trailing commas, and returns canonical JSON:
A path must start with $. Use [#-1] to index from the end of an array.
Wrap keys that contain spaces or punctuation in double quotes, as in $."key with spaces". The operators also accept a bare key or array index on the right, such as data -> 'user' or data -> 1. A missing path returns NULL.
Modify
These functions return a new JSON value and do not change the input.
Use [#] as the array index to append to the end of an array.
Aggregate
ORDER BY inside the aggregate, such as json_group_array(x ORDER BY x), is rejected as a parse error. Sort the rows in a subquery first instead.
Table-valued functions
See the SQLite documentation for json_each and json_tree.
Both accept jsonb() values as well as JSON text.
Index a JSON field
You can index an expression on a JSON field, and the query planner uses the index when a query filters on the same expression:
Not available
json_pretty() was added in SQLite 3.46 and is not available. Last modified on November 2, 2026