json.go
1package sqlite3
2
3import "github.com/ncruces/go-sqlite3/internal/util"
4
5// JSON returns a value that can be used as an argument to
6// [database/sql.DB.Exec], [database/sql.Row.Scan] and similar methods to
7// store value as JSON, or decode JSON into value.
8// JSON should NOT be used with [Stmt.BindJSON], [Stmt.ColumnJSON],
9// [Value.JSON], or [Context.ResultJSON].
10func JSON(value any) any {
11 return util.JSON{Value: value}
12}