# `Fun_Get_BracketContentAll_JSON` (function)


- **Type:** FUNCTION
- **Returns:** `longtext`
- **Deterministic:** NO
- **SQL data access:** CONTAINS SQL

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `userstr` | `longtext` |

## Body

_Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE FUNCTION `Fun_Get_BracketContentAll_JSON`'`._

## Narrative

**Business context:** Extracts every `[…]` placeholder out of a formula / template string and returns the names as a comma-joined, quoted list ready to splice into an `IN (...)` clause. Companion to [`Fun_Get_BracketContent`](Fun_Get_BracketContent.md), one level up in the same formula-resolution chain.

**What it does:** counts the `[` characters in `userstr`, then in a loop pulls the first bracket pair via `Fun_Get_BracketContent`, appends `'<token>',` to the accumulator, and removes `[<token>]` from the source. Leaves when no more `[` remain. Returns the accumulator with the trailing comma trimmed (or empty string if no bracket was found).

**Invocation:** Status: appears orphaned. No caller found in any channel (form-master sSqlStr, gdsmodule hooks, other routines, exhaustive xly-src grep, dynamic-dispatch search) — candidate for maintainer audit.
