The json-mop Reference Manual

This is the json-mop Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 06:31:56 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 json-mop

A metaclass for bridging CLOS and JSON

Author

Grim Schjetne

License

MIT

Dependencies
  • closer-mop (system).
  • yason (system).
  • anaphora (system).
Source

json-mop.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 json-mop/src

Source

json-mop.asd.

Parent Component

json-mop (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 json-mop/json-mop.asd

Source

json-mop.asd.

Parent Component

json-mop (system).

ASDF Systems

json-mop.


4.1.2 json-mop/src/package.lisp

Source

json-mop.asd.

Parent Component

src (module).

Packages

json-mop.


4.1.3 json-mop/src/conditions.lisp

Dependency

package.lisp (file).

Source

json-mop.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.4 json-mop/src/json-mop.lisp

Dependency

conditions.lisp (file).

Source

json-mop.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.5 json-mop/src/to-lisp.lisp

Dependency

json-mop.lisp (file).

Source

json-mop.asd.

Parent Component

src (module).

Public Interface
Internals

initialize-slots-from-json (function).


4.1.6 json-mop/src/to-json.lisp

Dependency

to-lisp.lisp (file).

Source

json-mop.asd.

Parent Component

src (module).

Public Interface
Internals

5 Packages

Packages are listed by definition order.


5.1 json-mop

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Generic functions

Generic Function: json-to-clos (input class &rest initargs)
Package

json-mop.

Source

to-lisp.lisp.

Methods
Method: json-to-clos ((input string) class &rest initargs)
Method: json-to-clos ((input pathname) class &rest initargs)
Method: json-to-clos ((input stream) class &rest initargs)
Method: json-to-clos ((input hash-table) class &rest initargs)
Generic Reader: json-type (condition)
Package

json-mop.

Methods
Reader Method: json-type ((json-serializable-slot json-serializable-slot))

automatically generated reader method

Source

json-mop.lisp.

Target Slot

json-type.

Reader Method: json-type ((condition json-type-error))
Source

conditions.lisp.

Target Slot

json-type.

Generic Reader: no-values-class (condition)
Package

json-mop.

Methods
Reader Method: no-values-class ((condition no-values-parsed))
Source

conditions.lisp.

Target Slot

class-name.

Generic Reader: no-values-hash-table (condition)
Package

json-mop.

Methods
Reader Method: no-values-hash-table ((condition no-values-parsed))
Source

conditions.lisp.

Target Slot

hash-table.

Generic Reader: slot-name (condition)
Package

json-mop.

Methods
Reader Method: slot-name ((condition slot-not-serializable))
Source

conditions.lisp.

Target Slot

slot-name.

Generic Function: to-json-value (value json-type)

Turns a VALUE into a form appropriate for consumption by Yason

Package

json-mop.

Source

to-json.lisp.

Methods
Method: to-json-value (value (json-type symbol))
Method: to-json-value ((value sequence) (json-type cons))

Return the homogeneous sequence VALUE

Method: to-json-value ((value hash-table) (json-type cons))

Return the homogeneous hash-table VALUE

Method: to-json-value ((value null) (json-type (eql :bool)))

Return the boolean false

Method: to-json-value (value (json-type (eql :bool)))

Return the boolean true

Method: to-json-value ((value null) (json-type (eql :list)))

Return the empty list VALUE

Method: to-json-value ((value list) (json-type (eql :list)))

Return the list VALUE

Method: to-json-value ((value vector) (json-type (eql :vector)))

Return the vector VALUE

Method: to-json-value ((value hash-table) (json-type (eql :hash-table)))

Return the hash-table VALUE

Method: to-json-value ((value integer) (json-type (eql :integer)))

Return the integer VALUE

Method: to-json-value ((value number) (json-type (eql :number)))

Return the number VALUE

Method: to-json-value ((value string) (json-type (eql :string)))

Return the string VALUE

Method: to-json-value ((value null) json-type)
Method: to-json-value (value (json-type (eql :any)))

When the JSON type is :ANY, Pass the VALUE unchanged

Generic Function: to-lisp-value (value json-type)

Turns a value passed by Yason into the appropriate Lisp type as specified by JSON-TYPE

Package

json-mop.

Source

to-lisp.lisp.

Methods
Method: to-lisp-value ((value hash-table) (json-type symbol))

Return the CLOS object VALUE

Method: to-lisp-value ((value vector) (json-type cons))

Return the homogeneous sequence VALUE

Method: to-lisp-value (value (json-type (eql :bool)))

Return the boolean VALUE

Method: to-lisp-value ((value vector) (json-type (eql :list)))

Return the list VALUE

Method: to-lisp-value ((value vector) (json-type (eql :vector)))

Return the vector VALUE

Method: to-lisp-value ((value hash-table) (json-type cons))

Return the homogeneous hash-table VALUE

Method: to-lisp-value ((value hash-table) (json-type (eql :hash-table)))

Return the hash-table VALUE

Method: to-lisp-value ((value integer) (json-type (eql :integer)))

Return the number VALUE

Method: to-lisp-value ((value number) (json-type (eql :number)))

Return the number VALUE

Method: to-lisp-value ((value string) (json-type (eql :string)))

Return the string VALUE

Method: to-lisp-value ((value hash-table) (json-type (eql :any)))

When the JSON type is :ANY, Pass the hash-table VALUE unchanged

Method: to-lisp-value (value (json-type (eql :any)))

When the JSON type is :ANY, Pass the VALUE unchanged

Method: to-lisp-value ((value (eql :null)) json-type)

When the value is JSON null, signal NULL-VALUE error


6.1.2 Standalone methods

Method: direct-slot-definition-class ((class json-serializable-class) &rest initargs)
Package

sb-mop.

Source

json-mop.lisp.

Method: encode ((object json-serializable) &optional stream)
Package

yason.

Source

to-json.lisp.

Method: encode ((sequence homogeneous-sequence-intermediate-class) &optional stream)
Package

yason.

Source

to-json.lisp.

Method: encode ((hash-table homogeneous-hash-table-intermediate-class) &optional stream)
Package

yason.

Source

to-json.lisp.

Method: initialize-instance :around ((class json-serializable-class) &rest rest &key direct-superclasses)
Source

json-mop.lisp.

Method: reinitialize-instance :around ((class json-serializable-class) &rest rest &key direct-superclasses)
Source

json-mop.lisp.

Method: validate-superclass ((class standard-class) (super json-serializable-class))
Package

sb-mop.

Source

json-mop.lisp.

Method: validate-superclass ((class json-serializable-class) (super standard-class))
Package

sb-mop.

Source

json-mop.lisp.


6.1.3 Conditions

Condition: json-type-error
Package

json-mop.

Source

conditions.lisp.

Direct superclasses

error.

Direct subclasses
Direct methods

json-type.

Direct slots
Slot: json-type
Initargs

:json-type

Readers

json-type.

Writers

This slot is read-only.

Condition: no-values-parsed
Package

json-mop.

Source

conditions.lisp.

Direct superclasses

warning.

Direct methods
Direct slots
Slot: hash-table
Package

common-lisp.

Initargs

:hash-table

Readers

no-values-hash-table.

Writers

This slot is read-only.

Slot: class-name
Package

common-lisp.

Initargs

:class-name

Readers

no-values-class.

Writers

This slot is read-only.

Condition: null-value
Package

json-mop.

Source

conditions.lisp.

Direct superclasses

json-type-error.

Condition: slot-not-serializable
Package

json-mop.

Source

conditions.lisp.

Direct superclasses

warning.

Direct methods

slot-name.

Direct slots
Slot: slot-name
Initargs

:slot-name

Readers

slot-name.

Writers

This slot is read-only.


6.1.4 Classes

Class: json-serializable
Package

json-mop.

Source

json-mop.lisp.

Direct methods

encode.

Class: json-serializable-class
Package

json-mop.

Source

json-mop.lisp.

Direct superclasses

standard-class.

Direct methods

6.2 Internals


6.2.1 Special variables

Special Variable: *encode-unbound-slots*
Package

json-mop.

Source

to-json.lisp.


6.2.2 Ordinary functions

Function: initialize-slots-from-json (input lisp-object class-obj &optional key-count)

Initializes all slots from LISP-OBJECT from INPUT.

All slots, direct or inherited, that exist in class CLASS-OBJ are considered.

Package

json-mop.

Source

to-lisp.lisp.

Function: read-eval-query ()
Package

json-mop.

Source

conditions.lisp.


6.2.3 Generic functions

Generic Function: json-key-name (object)
Package

json-mop.

Methods
Method: json-key-name ((slot standard-direct-slot-definition))
Source

json-mop.lisp.

Reader Method: json-key-name ((json-serializable-slot json-serializable-slot))

automatically generated reader method

Source

json-mop.lisp.

Target Slot

json-key.


6.2.4 Conditions

Condition: null-in-homogeneous-sequence
Package

json-mop.

Source

conditions.lisp.

Direct superclasses

json-type-error.


6.2.5 Classes

Class: homogeneous-hash-table-intermediate-class
Package

json-mop.

Source

to-json.lisp.

Direct methods

encode.

Direct slots
Slot: values
Package

common-lisp.

Initargs

:values

Slot: hash-table-json-type
Initargs

:hash-table-json-type

Slot: element-json-type
Initargs

:element-json-type

Class: homogeneous-sequence-intermediate-class
Package

json-mop.

Source

to-json.lisp.

Direct methods

encode.

Direct slots
Slot: values
Package

common-lisp.

Initargs

:values

Slot: sequence-json-type
Initargs

:sequence-json-type

Slot: element-json-type
Initargs

:element-json-type

Class: json-serializable-slot
Package

json-mop.

Source

json-mop.lisp.

Direct superclasses

standard-direct-slot-definition.

Direct methods
Direct slots
Slot: json-key
Initargs

:json-key

Readers

json-key-name.

Writers

This slot is read-only.

Slot: json-type
Initform

:any

Initargs

:json-type

Readers

json-type.

Writers

This slot is read-only.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   D   E   F   G   I   J   M   N   R   S   T   V  
Index Entry  Section

D
direct-slot-definition-class: Public standalone methods

E
encode: Public standalone methods
encode: Public standalone methods
encode: Public standalone methods

F
Function, initialize-slots-from-json: Private ordinary functions
Function, read-eval-query: Private ordinary functions

G
Generic Function, json-key-name: Private generic functions
Generic Function, json-to-clos: Public generic functions
Generic Function, json-type: Public generic functions
Generic Function, no-values-class: Public generic functions
Generic Function, no-values-hash-table: Public generic functions
Generic Function, slot-name: Public generic functions
Generic Function, to-json-value: Public generic functions
Generic Function, to-lisp-value: Public generic functions

I
initialize-instance: Public standalone methods
initialize-slots-from-json: Private ordinary functions

J
json-key-name: Private generic functions
json-key-name: Private generic functions
json-key-name: Private generic functions
json-to-clos: Public generic functions
json-to-clos: Public generic functions
json-to-clos: Public generic functions
json-to-clos: Public generic functions
json-to-clos: Public generic functions
json-type: Public generic functions
json-type: Public generic functions
json-type: Public generic functions

M
Method, direct-slot-definition-class: Public standalone methods
Method, encode: Public standalone methods
Method, encode: Public standalone methods
Method, encode: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, json-key-name: Private generic functions
Method, json-key-name: Private generic functions
Method, json-to-clos: Public generic functions
Method, json-to-clos: Public generic functions
Method, json-to-clos: Public generic functions
Method, json-to-clos: Public generic functions
Method, json-type: Public generic functions
Method, json-type: Public generic functions
Method, no-values-class: Public generic functions
Method, no-values-hash-table: Public generic functions
Method, reinitialize-instance: Public standalone methods
Method, slot-name: Public generic functions
Method, to-json-value: Public generic functions
Method, to-json-value: Public generic functions
Method, to-json-value: Public generic functions
Method, to-json-value: Public generic functions
Method, to-json-value: Public generic functions
Method, to-json-value: Public generic functions
Method, to-json-value: Public generic functions
Method, to-json-value: Public generic functions
Method, to-json-value: Public generic functions
Method, to-json-value: Public generic functions
Method, to-json-value: Public generic functions
Method, to-json-value: Public generic functions
Method, to-json-value: Public generic functions
Method, to-json-value: Public generic functions
Method, to-lisp-value: Public generic functions
Method, to-lisp-value: Public generic functions
Method, to-lisp-value: Public generic functions
Method, to-lisp-value: Public generic functions
Method, to-lisp-value: Public generic functions
Method, to-lisp-value: Public generic functions
Method, to-lisp-value: Public generic functions
Method, to-lisp-value: Public generic functions
Method, to-lisp-value: Public generic functions
Method, to-lisp-value: Public generic functions
Method, to-lisp-value: Public generic functions
Method, to-lisp-value: Public generic functions
Method, to-lisp-value: Public generic functions
Method, validate-superclass: Public standalone methods
Method, validate-superclass: Public standalone methods

N
no-values-class: Public generic functions
no-values-class: Public generic functions
no-values-hash-table: Public generic functions
no-values-hash-table: Public generic functions

R
read-eval-query: Private ordinary functions
reinitialize-instance: Public standalone methods

S
slot-name: Public generic functions
slot-name: Public generic functions

T
to-json-value: Public generic functions
to-json-value: Public generic functions
to-json-value: Public generic functions
to-json-value: Public generic functions
to-json-value: Public generic functions
to-json-value: Public generic functions
to-json-value: Public generic functions
to-json-value: Public generic functions
to-json-value: Public generic functions
to-json-value: Public generic functions
to-json-value: Public generic functions
to-json-value: Public generic functions
to-json-value: Public generic functions
to-json-value: Public generic functions
to-json-value: Public generic functions
to-lisp-value: Public generic functions
to-lisp-value: Public generic functions
to-lisp-value: Public generic functions
to-lisp-value: Public generic functions
to-lisp-value: Public generic functions
to-lisp-value: Public generic functions
to-lisp-value: Public generic functions
to-lisp-value: Public generic functions
to-lisp-value: Public generic functions
to-lisp-value: Public generic functions
to-lisp-value: Public generic functions
to-lisp-value: Public generic functions
to-lisp-value: Public generic functions
to-lisp-value: Public generic functions

V
validate-superclass: Public standalone methods
validate-superclass: Public standalone methods


A.4 Data types

Jump to:   C   F   H   J   M   N   P   S   T  
Index Entry  Section

C
Class, homogeneous-hash-table-intermediate-class: Private classes
Class, homogeneous-sequence-intermediate-class: Private classes
Class, json-serializable: Public classes
Class, json-serializable-class: Public classes
Class, json-serializable-slot: Private classes
Condition, json-type-error: Public conditions
Condition, no-values-parsed: Public conditions
Condition, null-in-homogeneous-sequence: Private conditions
Condition, null-value: Public conditions
Condition, slot-not-serializable: Public conditions
conditions.lisp: The json-mop/src/conditions․lisp file

F
File, conditions.lisp: The json-mop/src/conditions․lisp file
File, json-mop.asd: The json-mop/json-mop․asd file
File, json-mop.lisp: The json-mop/src/json-mop․lisp file
File, package.lisp: The json-mop/src/package․lisp file
File, to-json.lisp: The json-mop/src/to-json․lisp file
File, to-lisp.lisp: The json-mop/src/to-lisp․lisp file

H
homogeneous-hash-table-intermediate-class: Private classes
homogeneous-sequence-intermediate-class: Private classes

J
json-mop: The json-mop system
json-mop: The json-mop package
json-mop.asd: The json-mop/json-mop․asd file
json-mop.lisp: The json-mop/src/json-mop․lisp file
json-serializable: Public classes
json-serializable-class: Public classes
json-serializable-slot: Private classes
json-type-error: Public conditions

M
Module, src: The json-mop/src module

N
no-values-parsed: Public conditions
null-in-homogeneous-sequence: Private conditions
null-value: Public conditions

P
Package, json-mop: The json-mop package
package.lisp: The json-mop/src/package․lisp file

S
slot-not-serializable: Public conditions
src: The json-mop/src module
System, json-mop: The json-mop system

T
to-json.lisp: The json-mop/src/to-json․lisp file
to-lisp.lisp: The json-mop/src/to-lisp․lisp file