Skip to main content

Crate fsqlite_ext_json

Crate fsqlite_ext_json 

Source
Expand description

JSON1 foundations for fsqlite-ext-json (bd-3cvl).

This module currently provides:

  • JSON validation/minification (json, json_valid)
  • JSONB encode/decode helpers (jsonb, jsonb_*, json_valid JSONB flags)
  • JSON type inspection (json_type)
  • JSON path extraction with SQLite-like single vs multi-path semantics (json_extract)
  • JSON value constructors and aggregates (json_quote, json_array, json_object, json_group_array, json_group_object)
  • mutators (json_set, json_insert, json_replace, json_remove, json_patch)
  • formatting and diagnostics (json_pretty, json_error_position, json_array_length)

Path support in this slice:

  • $ root
  • $.key object member
  • $."key.with.dots" quoted object member
  • $[N] array index
  • $[#] append pseudo-index
  • $[#-N] reverse array index

Structs§

JsonArrayFunc
JsonArrayLengthFunc
JsonArrowFunc
JsonDoubleArrowFunc
JsonEachCursor
Cursor for json_each virtual table scans.
JsonEachVtab
Virtual table module for json_each.
JsonErrorPositionFunc
JsonExtractFunc
JsonFunc
JsonInsertFunc
JsonObjectFunc
JsonPatchFunc
JsonPrettyFunc
JsonQuoteFunc
JsonRemoveFunc
JsonReplaceFunc
JsonSetFunc
JsonTableRow
Row shape produced by json_each and json_tree.
JsonTreeCursor
Cursor for json_tree virtual table scans.
JsonTreeVtab
Virtual table module for json_tree.
JsonTypeFunc
JsonValidFunc
JsonbArrayFunc
JsonbExtractFunc
JsonbFunc
JsonbInsertFunc
JsonbObjectFunc
JsonbPatchFunc
JsonbRemoveFunc
JsonbReplaceFunc
JsonbSetFunc

Constants§

JSON_TABLE_COLUMN_NAMES
Output columns for the json_each / json_tree table-valued functions.

Functions§

json
Parse and minify JSON text.
json_array
Build a JSON array from SQL values.
json_array_length
Return the array length at root or path, or None when target is not an array.
json_arrow
Extract with -> semantics: always returns JSON text for the selected node.
json_double_arrow
Extract with ->> semantics: returns SQL-native value.
json_each
Table-valued json_each: iterate immediate children at root or path.
json_error_position
Return 0 for valid JSON, otherwise a 1-based position for first parse error.
json_extract
Extract JSON value(s) by path, following SQLite single vs multi-path behavior.
json_from_jsonb
Convert JSONB bytes back into minified JSON text.
json_group_array
Aggregate rows into a JSON array, preserving SQL NULL as JSON null.
json_group_object
Aggregate key/value pairs into a JSON object.
json_insert
Insert JSON values at path(s) only when path does not already exist.
json_object
Build a JSON object from alternating key/value SQL arguments.
json_patch
Apply RFC 7396 JSON Merge Patch.
json_pretty
Pretty-print JSON with default 4-space indentation or custom indent token.
json_quote
Quote a SQL value as JSON.
json_remove
Remove JSON values at path(s). Array removals compact the array.
json_replace
Replace JSON values at path(s) only when path already exists.
json_set
Set JSON values at path(s), creating object keys when missing.
json_tree
Table-valued json_tree: recursively iterate subtree at root or path.
json_type
Return JSON type name at the root or an optional path.
json_valid
Validate JSON text under flags compatible with SQLite json_valid.
json_valid_blob
Validate binary JSONB payloads and/or JSON text (when UTF-8).
jsonb
Convert JSON text into JSONB bytes.
jsonb_array
Build JSONB from SQL values.
jsonb_extract
JSONB variant of json_extract.
jsonb_group_array
JSONB variant of json_group_array.
jsonb_group_object
JSONB variant of json_group_object.
jsonb_insert
JSONB variant of json_insert.
jsonb_object
Build JSONB object from alternating key/value SQL arguments.
jsonb_patch
JSONB variant of json_patch.
jsonb_remove
JSONB variant of json_remove.
jsonb_replace
JSONB variant of json_replace.
jsonb_set
JSONB variant of json_set.
register_json_scalars
Register JSON1 scalar functions into a FunctionRegistry.