# `Fun_RemoveJsonEmptyKey` (function) - **Type:** FUNCTION - **Returns:** `longtext` - **Deterministic:** NO - **SQL data access:** CONTAINS SQL ## Parameters | # | Mode | Name | Type | |---|---|---|---| | 1 | IN | `sJson` | `longtext` | ## Body _Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE FUNCTION `Fun_RemoveJsonEmptyKey`'`._ ## Narrative **Business context:** Filter-JSON sanitizer used by the production-scheduling Gantt/tree builders — strips list entries whose `bFilterValue` is blank or the placeholder `null,null` before the JSON is passed to a tree-rendering proc. **What it does:** Iterates the JSON array; for each element extracts `$.bFilterValue` and removes that element when empty / `null,null`. Returns `''` if the array empties out, otherwise the trimmed JSON. **Invocation:** Called from `sp_manufacture_productionplaninfotrace`, `sp_manufacture_productionplaninfotrace1`, and `Sp_Manufacture_ProductionPlanInfoTree_Base_TC` — the production-plan info-tree builders (生产计划信息树 / 排产看板). These are themselves invoked dynamically from the scheduling front-end; no static Java caller exists.