Use slot for JSON @context; default slots to nil
This commit is contained in:
parent
41c09bd7e7
commit
c2a97ba600
|
@ -59,7 +59,8 @@ is equivalent to
|
||||||
(typecase slot
|
(typecase slot
|
||||||
(list slot)
|
(list slot)
|
||||||
(t (list slot :accessor (intern (format nil "~A-~A" name slot))
|
(t (list slot :accessor (intern (format nil "~A-~A" name slot))
|
||||||
:initarg (intern (symbol-name slot) "KEYWORD")))))
|
:initarg (intern (symbol-name slot) "KEYWORD")
|
||||||
|
:initform nil))))
|
||||||
slots)
|
slots)
|
||||||
,@options))
|
,@options))
|
||||||
|
|
||||||
|
@ -93,14 +94,8 @@ CLASS’es slots with JSON keys based on the camel-cased slot name."
|
||||||
attachment attributed-to audience bcc bto cc content context
|
attachment attributed-to audience bcc bto cc content context
|
||||||
duration end-time generator icon image in-reply-to location
|
duration end-time generator icon image in-reply-to location
|
||||||
media-type name preview published replies start-time summary
|
media-type name preview published replies start-time summary
|
||||||
tag to updated url))
|
tag to updated url
|
||||||
|
(@context :initform "https://www.w3.org/ns/activitystreams")))
|
||||||
(defgeneric json-ld-context (obj)
|
|
||||||
(:documentation "Return an object’s appropriate JSON-LD @context contents, in list-form.
|
|
||||||
For use in serialization to JSON."))
|
|
||||||
|
|
||||||
(defmethod json-ld-context ((object object))
|
|
||||||
"https://www.w3.org/ns/activitystreams")
|
|
||||||
|
|
||||||
;; https://www.w3.org/ns/activitystreams#Link
|
;; https://www.w3.org/ns/activitystreams#Link
|
||||||
(defclass-w-accessors link ()
|
(defclass-w-accessors link ()
|
||||||
|
@ -130,7 +125,6 @@ For use in serialization to JSON."))
|
||||||
(start-index))
|
(start-index))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;; Extended Activity types
|
;;; Extended Activity types
|
||||||
;;; ————————————————————————————————————————
|
;;; ————————————————————————————————————————
|
||||||
|
@ -149,7 +143,7 @@ For use in serialization to JSON."))
|
||||||
|
|
||||||
;;; Extended Actor types
|
;;; Extended Actor types
|
||||||
;;; ————————————————————————————————————————
|
;;; ————————————————————————————————————————
|
||||||
(defclass-empty-children actor
|
(defclass-empty-children object
|
||||||
(application group organization person service))
|
(application group organization person service))
|
||||||
|
|
||||||
|
|
||||||
|
|
Ŝarĝante…
Reference in New Issue