Commit d4f4ee22 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

messages: Add <inspect-request> and <inspect-reply>.

* jupyter/messages.scm (<inspect-request>, <inspect-reply>): New record
types.
parent 979a1957
......@@ -113,7 +113,24 @@
execute-result-data
execute-result-metadata
json->execute-result
execute-result->json))
execute-result->json
inspect-request?
inspect-request
inspect-request-code
inspect-request-cursor-position
inspect-request-detail-level
json->inspect-request
inspect-request->json
inspect-reply?
inspect-reply
inspect-reply-status
inspect-reply-found?
inspect-reply-data
inspect-reply-metadata
json->inspect-reply
inspect-reply->json))
;;; Commentary:
;;;
......@@ -396,3 +413,26 @@ This is a low-level procedure for internal use."
(json "execution_count"))
(data execute-result-data (default '())) ;alist
(metadata execute-result-metadata (default '()))) ;alist
(define-json-mapping <inspect-request> inspect-request
make-inspect-request
inspect-request?
json->inspect-request <=> inspect-request->json
(code inspect-request-code)
(cursor-position inspect-request-cursor-position
(json "cursor_pos"))
(detail-level inspect-request-detail-level
(json "detail_level") (default 0)))
(define-json-mapping <inspect-reply> inspect-reply
make-inspect-reply
inspect-reply?
json->inspect-reply <=> inspect-reply->json
(status inspect-reply-status
(json "status" string->symbol symbol->string)
(default 'ok))
(found? inspect-reply-found? (json "found"))
(data inspect-reply-data
(json "data") (default '()))
(metadata inspect-reply-metadata
(json "metadata") (default '())))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment