%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/ |
Current File : //usr/local/share/emacs/27.2/lisp/json.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\207" [require map subr-x] 2) #@243 Type to convert JSON objects to. Must be one of `alist', `plist', or `hash-table'. Consider let-binding this around your call to `json-read' instead of `setq'ing it. Ordering is maintained for `alist' and `plist', but not for `hash-table'. (defvar json-object-type 'alist (#$ . 473)) #@152 Type to convert JSON arrays to. Must be one of `vector' or `list'. Consider let-binding this around your call to `json-read' instead of `setq'ing it. (defvar json-array-type 'vector (#$ . 766)) #@533 Type to convert JSON keys to. Must be one of `string', `symbol', `keyword', or nil. If nil, `json-read' will guess the type based on the value of `json-object-type': If `json-object-type' is: nil will be interpreted as: `hash-table' `string' `alist' `symbol' `plist' `keyword' Note that values other than `string' might behave strangely for Sufficiently Weird keys. Consider let-binding this around your call to `json-read' instead of `setq'ing it. (defvar json-key-type nil (#$ . 968)) #@241 Value to use when reading JSON `false'. If this has the same value as `json-null', you might not be able to tell the difference between `false' and `null'. Consider let-binding this around your call to `json-read' instead of `setq'ing it. (defvar json-false :json-false (#$ . 1545)) #@241 Value to use when reading JSON `null'. If this has the same value as `json-false', you might not be able to tell the difference between `false' and `null'. Consider let-binding this around your call to `json-read' instead of `setq'ing it. (defvar json-null nil (#$ . 1836)) #@53 Value to use as an element separator when encoding. (defvar json-encoding-separator "," (#$ . 2117)) #@101 The default indentation level for encoding. Used only when `json-encoding-pretty-print' is non-nil. (defvar json-encoding-default-indentation " " (#$ . 2225)) #@133 Internally used to keep track of the current indentation level of encoding. Used only when `json-encoding-pretty-print' is non-nil. (defvar json--encoding-current-indentation "\n" (#$ . 2392)) #@70 If non-nil, then the output of `json-encode' will be pretty-printed. (defvar json-encoding-pretty-print nil (#$ . 2591)) #@81 If non-nil, ] and } closings will be formatted lisp-style, without indentation. (defvar json-encoding-lisp-style-closings nil (#$ . 2718)) #@267 Sorting predicate for JSON object keys during encoding. If nil, no sorting is performed. Else, JSON object keys are ordered by the specified sort predicate during encoding. For instance, setting this to `string<' will have JSON object keys ordered alphabetically. (defvar json-encoding-object-sort-predicate nil (#$ . 2864)) #@207 Function called (if non-nil) by `json-read-array' and `json-read-object' right before reading a JSON array or object, respectively. The function is called with one argument, which is the current JSON key. (defvar json-pre-element-read-function nil (#$ . 3198)) #@132 Function called (if non-nil) by `json-read-array' and `json-read-object' right after reading a JSON array or object, respectively. (defvar json-post-element-read-function nil (#$ . 3467)) #@54 Join STRINGS with SEPARATOR. (fn STRINGS SEPARATOR) (defalias 'json-join #[514 "\300\301#\207" [mapconcat identity] 6 (#$ . 3661)]) #@71 Non-null if and only if LIST is an alist with simple keys. (fn LIST) (defalias 'json-alist-p #[257 "\211:\203 \211@:\203 \211@@:\204 \211A\202 \300\262\202 \211?\207" [not-alist] 2 (#$ . 3802)]) #@71 Non-null if and only if LIST is a plist with keyword keys. (fn LIST) (defalias 'json-plist-p #[257 "\211:\203 \300@!\203 \211A:\203 \211AA\202 \301\262\202 \211?\207" [keywordp not-plist] 3 (#$ . 4010)]) #@116 Return a copy of PLIST in reverse order. Unlike `reverse', this keeps the property-value pairs intact. (fn PLIST) (defalias 'json--plist-reverse #[257 "\300\203 \211A\262\242\211A\262\242\211B\262B\266\203\202 \211\207" [nil] 6 (#$ . 4229)]) #@67 Return an alist of the property-value pairs in PLIST. (fn PLIST) (defalias 'json--plist-to-alist #[257 "\300\203 \211A\262\242\211A\262\242BB\266\203\202 \211\237\207" [nil] 6 (#$ . 4489)]) #@13 (fn BODY) (defalias 'json--with-indentation '(macro . #[257 "\300\301E\207" [let ((json--encoding-current-indentation (if json-encoding-pretty-print (concat json--encoding-current-indentation json-encoding-default-indentation) "")))] 4 (#$ . 4696)])) #@49 Advance N characters forward. (fn &optional N) (defalias 'json-advance #[256 "\211u\207" [] 2 (#$ . 4956)]) (byte-code "\300\301\302\303#\300\207" [function-put json-advance compiler-macro json-advance--inliner] 4) #@33 (fn INLINE--FORM &optional N) (defalias 'json-advance--inliner #[513 "\3002 \301D0\207" [inline--just-use forward-char] 4 (#$ . 5178)]) #@32 Return the character at point. (defalias 'json-peek #[0 "g\207" [] 1 (#$ . 5324)]) (byte-code "\300\301\302\303#\300\207" [function-put json-peek compiler-macro json-peek--inliner] 4) #@21 (fn INLINE--FORM) (defalias 'json-peek--inliner #[257 "\3002 \301C0\207" [inline--just-use following-char] 2 (#$ . 5514)]) #@52 Advance past the character at point, returning it. (defalias 'json-pop #[0 "g\211\300U\203 \301\302\303\"\202 \303u\210\211\207" [0 signal json-end-of-file nil] 4 (#$ . 5646)]) (byte-code "\300\301\302\303#\300\207" [function-put json-pop compiler-macro json-pop--inliner] 4) #@21 (fn INLINE--FORM) (defalias 'json-pop--inliner #[257 "\3002 \301\302\303CDC\304\305\302D\306\307\310D\311E\312C\302\257E0\207" [inline--just-use let char json-peek if zerop signal quote json-end-of-file nil json-advance] 8 (#$ . 5930)]) #@36 Skip past the whitespace at point. (defalias 'json-skip-whitespace #[0 "\300\301w\207" [" \n " nil] 2 (#$ . 6177)]) (byte-code "\300\301\302\303#\300\207" [function-put json-skip-whitespace compiler-macro json-skip-whitespace--inliner] 4) #@21 (fn INLINE--FORM) (defalias 'json-skip-whitespace--inliner #[257 "\3002 \301\302D0\207" [inline--just-use skip-chars-forward " \n "] 3 (#$ . 6423)]) (byte-code "\300\301\302\"\210\300\303\304\301#\210\300\305\306\301#\210\300\307\310\301#\210\300\311\312\301#\210\300\313\314\301#\210\300\315\316\301#\210\300\317\320\301#\210\300\321\322\323#\207" [define-error json-error "Unknown JSON error" json-readtable-error "JSON readtable error" json-unknown-keyword "Unrecognized keyword" json-number-format "Invalid number format" json-string-escape "Bad Unicode escape" json-string-format "Bad string format" json-key-format "Bad JSON object key" json-object-format "Bad JSON object" json-end-of-file "End of file while parsing JSON" (end-of-file json-error)] 4) #@109 Used internally by `json-path-to-position' to keep track of the path during recursive calls to `json-read'. (defvar json--path nil (#$ . 7193)) #@96 Record the KEY to the current JSON path. Used internally by `json-path-to-position'. (fn KEY) (defalias 'json--record-path #[257 "`BB\211\207" [json--path] 3 (#$ . 7343)]) #@117 Check if the last parsed JSON structure passed POSITION. Used internally by `json-path-to-position'. (fn POSITION) (defalias 'json--check-position #[257 "@@\301`T#\203 \302\303\304\305\306\"\237\307\310`\257\"\210\210\211A\242\207" [json--path < throw :json-path :path mapcar cdr :match-start :match-end] 10 (#$ . 7526)]) #@719 Return the path to the JSON element at POSITION. When STRING is provided, return the path to the position in the string, else to the position in the current buffer. The return value is a property list with the following properties: :path -- A list of strings and numbers forming the path to the JSON element at the given position. Strings denote object names, while numbers denote array indexes. :match-start -- Position where the matched JSON element begins. :match-end -- Position where the matched JSON element ends. This can for instance be useful to determine the path to a JSON element in a deeply nested structure. (fn POSITION &optional STRING) (defalias 'json-path-to-position #[513 "\212\211\204 eb\210\303\304\305\306\"\3072\"