diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-25 00:05:32 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-25 00:06:03 +0100 |
| commit | 740e975fbcb3079d1277f60c9438e46f146f0125 (patch) | |
| tree | f4769192e509683e0b70a4fd54b8a94fc2ee44c8 | |
| parent | 7e678b3fa102a86553921d6c24056bbbe5365c7e (diff) | |
Add docstring
| -rw-r--r-- | compat.el | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -89,10 +89,14 @@ See also `compat-function' to lookup compatibility functions." (defvar json-object-type) (defvar json-key-type) (declare-function json-read nil) - (declare-function compat--json--print nil) + (unless (eval-when-compile (ignore-errors (eval '(json-parse-string "[]") t))) (defun compat--json--print (obj) + "Print OBJ to the current-buffer/standard-output. +We provide our entire reimplementation of `json--print' and +`json-encode', since the error checking and the format of +libjansson and json.el differ too much." (cond ((numberp obj) (prin1 obj)) ((eq obj t) (insert "true")) |
