Top level wrapper for json-encode-main.
(json-encode x) → x-json
This wraps up the accumulator used by json-encode-main and deals with getting the characters into the right order.
Function:
(defun json-encode (x) (declare (xargs :guard t)) (let ((__function__ 'json-encode)) (declare (ignorable __function__)) (let ((acc (json-encode-main x nil))) (str::rchars-to-string acc))))
Theorem:
(defthm stringp-of-json-encode (b* ((x-json (json-encode x))) (stringp x-json)) :rule-classes :type-prescription)