Function: json-ts--path-to-python

json-ts--path-to-python is a byte-compiled function defined in json-ts-mode.el.gz.

Signature

(json-ts--path-to-python PATH)

Documentation

Convert PATH list to a Python-style path string.

PATH is a list of keys (strings) and indices (numbers).

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/json-ts-mode.el.gz
(defun json-ts--path-to-python (path)
  "Convert PATH list to a Python-style path string.
PATH is a list of keys (strings) and indices (numbers)."
  (mapconcat
   (lambda (x)
     (cond
      ((numberp x) (format "[%d]" x))
      ((stringp x) (format "[\"%s\"]" x))
      (t "")))
   path
   ""))