Function: json-encode-key

json-encode-key is a byte-compiled function defined in json.el.gz.

This function is obsolete since 28.1; use json-encode instead.

Signature

(json-encode-key OBJECT)

Documentation

Return a JSON representation of OBJECT.

If the resulting JSON object isn't a valid JSON object key, this signals json-key-format.

Probably introduced at or before Emacs version 28.1.

Source Code

;; Defined in /usr/src/emacs/lisp/json.el.gz
(defun json-encode-key (object)
  "Return a JSON representation of OBJECT.
If the resulting JSON object isn't a valid JSON object key,
this signals `json-key-format'."
  (declare (obsolete json-encode "28.1"))
  (json--with-output-to-string (json--print-key object)))