Function: claude-code-ide-mcp--prepare-schema-for-json
claude-code-ide-mcp--prepare-schema-for-json is a natively compiled
function defined in claude-code-ide-mcp.el.
Signature
(claude-code-ide-mcp--prepare-schema-for-json SCHEMA)
Documentation
Prepare SCHEMA for JSON encoding.
Converts :json-empty to empty hash tables which json-encode will turn into {}. Recursively processes nested structures.
Source Code
;; Defined in /nix/store/yjvbhwl7p6zrbw9xlnni7y4hra8sa3pl-emacs-packages-deps/share/emacs/site-lisp/claude-code-ide-mcp.el
(defun claude-code-ide-mcp--prepare-schema-for-json (schema)
"Prepare SCHEMA for JSON encoding.
Converts :json-empty to empty hash tables which json-encode will
turn into {}. Recursively processes nested structures."
(cond
;; If it's :json-empty, return an empty alist which json-encode will convert to {}
((eq schema :json-empty)
(make-hash-table :test 'equal))
;; If it's a list, recursively process each element
((listp schema)
(mapcar (lambda (item)
(if (consp item)
(cons (car item) (claude-code-ide-mcp--prepare-schema-for-json (cdr item)))
item))
schema))
;; Otherwise return as-is
(t schema)))