Function: json--print-stringlike

json--print-stringlike is a byte-compiled function defined in json.el.gz.

Signature

(json--print-stringlike OBJECT)

Documentation

Insert OBJECT encoded as a JSON string at point.

Return nil if OBJECT cannot be encoded as a JSON string.

Source Code

;; Defined in /usr/src/emacs/lisp/json.el.gz
(defun json--print-stringlike (object)
  "Insert OBJECT encoded as a JSON string at point.
Return nil if OBJECT cannot be encoded as a JSON string."
  (cond ((stringp object)  (json--print-string object))
        ((keywordp object) (json--print-string (symbol-name object) 1))
        ((symbolp object)  (json--print-string (symbol-name object)))))