The cl-json Reference Manual

This is the cl-json Reference Manual, version 0.6.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:03:42 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 cl-json

JSON in Lisp. JSON (JavaScript Object Notation) is a lightweight data-interchange format.

Maintainer

Robert P. Goldman <>

Author

Henrik Hjelte <>

License

MIT

Version

0.6.0

Source

cl-json.asd.

Child Component

src (module).


3 Modules

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


3.1 cl-json/src

Source

cl-json.asd.

Parent Component

cl-json (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 cl-json/cl-json.asd

Source

cl-json.asd.

Parent Component

cl-json (system).

ASDF Systems

cl-json.

Packages

json-system.

Internals

*cl-json-directory* (special variable).


4.1.2 cl-json/src/package.lisp

Source

cl-json.asd.

Parent Component

src (module).

Packages

4.1.3 cl-json/src/common.lisp

Dependency

package.lisp (file).

Source

cl-json.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.4 cl-json/src/objects.lisp

Dependency

package.lisp (file).

Source

cl-json.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.5 cl-json/src/camel-case.lisp

Dependency

package.lisp (file).

Source

cl-json.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.6 cl-json/src/decoder.lisp

Dependencies
Source

cl-json.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.7 cl-json/src/encoder.lisp

Dependencies
Source

cl-json.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.8 cl-json/src/utils.lisp

Dependencies
Source

cl-json.asd.

Parent Component

src (module).

Public Interface

json-bind (macro).

Internals

4.1.9 cl-json/src/json-rpc.lisp

Dependencies
Source

cl-json.asd.

Parent Component

src (module).

Public Interface
Internals

5 Packages

Packages are listed by definition order.


5.1 json-rpc

Source

package.lisp.

Use List
  • common-lisp.
  • json.
Public Interface
Internals

5.2 json

Source

package.lisp.

Nickname

cl-json

Use List

common-lisp.

Used By List

json-rpc.

Public Interface
Internals

5.3 json-system

Source

cl-json.asd.

Use List
  • asdf/interface.
  • common-lisp.
  • uiop/driver.
Internals

*cl-json-directory* (special variable).


6 Definitions

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


6.1 Public Interface


6.1.1 Constants

Constant: +json-rpc-1.1+
Package

json-rpc.

Source

json-rpc.lisp.

Constant: +json-rpc-2.0+
Package

json-rpc.

Source

json-rpc.lisp.


6.1.2 Special variables

Special Variable: *aggregate-scope-variables*

A list of symbols naming dynamic variables which should be re-bound in the scope of every JSON aggregate value (Object, Array or String).

Package

json.

Source

decoder.lisp.

Special Variable: *array-member-handler*

Designator for a function of 1 arbitrary argument (decoded member of Array).

Package

json.

Source

decoder.lisp.

Special Variable: *array-scope-variables*

A list of symbols naming dynamic variables which should be re-bound in the scope of every JSON Array.

Package

json.

Source

decoder.lisp.

Special Variable: *beginning-of-array-handler*

Designator for a function of no arguments (called at encountering an opening bracket for an Array).

Package

json.

Source

decoder.lisp.

Special Variable: *beginning-of-object-handler*

Designator for a function of no arguments (called at encountering an opening brace for an Object).

Package

json.

Source

decoder.lisp.

Special Variable: *beginning-of-string-handler*

Designator for a function of no arguments (called at encountering an opening quote for a String).

Package

json.

Source

decoder.lisp.

Special Variable: *boolean-handler*

Designator for a function of 1 string argument (boolean token).

Package

json.

Source

decoder.lisp.

Special Variable: *end-of-array-handler*

Designator for a function of no arguments (called at encountering a closing bracket for an Array).

Package

json.

Source

decoder.lisp.

Special Variable: *end-of-object-handler*

Designator for a function of no arguments (called at encountering a closing brace for an Object).

Package

json.

Source

decoder.lisp.

Special Variable: *end-of-string-handler*

Designator for a function of no arguments (called at encountering a closing quote for a String).

Package

json.

Source

decoder.lisp.

Special Variable: *identifier-name-to-key*

Designator for a function which, during decoding, maps the *json-identifier-name-to-lisp* -transformed key to the value it will have in the result object.

Package

json.

Source

common.lisp.

Special Variable: *integer-handler*

Designator for a function of 1 string argument (integer token).

Package

json.

Source

decoder.lisp.

Special Variable: *internal-decoder*

Designator for a function of 1 stream argument called (instead of DECODE-JSON) to decode a member of an Array or of an Object.

Package

json.

Source

decoder.lisp.

Special Variable: *json-array-type*

The Lisp sequence type to which JSON Arrays are to be coerced.

Package

json.

Source

decoder.lisp.

Special Variable: *json-identifier-name-to-lisp*

Designator for a function which maps string (a JSON Object key) to string (name of a Lisp symbol).

Package

json.

Source

common.lisp.

Special Variable: *json-input*

The default input stream for decoding operations.

Package

json.

Source

decoder.lisp.

Special Variable: *json-output*

The default output stream for encoding operations.

Package

json.

Source

encoder.lisp.

Special Variable: *json-rpc-version*

Bind this variable to influence whether you want to use JSON-RPC version 1.1 or 2.0.

Package

json-rpc.

Source

json-rpc.lisp.

Special Variable: *json-symbols-package*

The package where JSON Object keys etc. are interned. Default KEYWORD, NIL = use current *PACKAGE*.

Package

json.

Source

common.lisp.

Special Variable: *lisp-identifier-name-to-json*

Designator for a function which maps string (name of a Lisp symbol) to string (e. g. JSON Object key).

Package

json.

Source

common.lisp.

Special Variable: *object-key-handler*

Designator for a function of 1 string argument (decoded member key of Object).

Package

json.

Source

decoder.lisp.

Special Variable: *object-scope-variables*

A list of symbols naming dynamic variables which should be re-bound in the scope of every JSON Object.

Package

json.

Source

decoder.lisp.

Special Variable: *object-value-handler*

Designator for a function of 1 arbitrary argument (decoded member value of Object).

Package

json.

Source

decoder.lisp.

Special Variable: *prototype-name*

The key of the prototype field in a JSON Object, and the name of a slot in a Lisp object which accepts its prototype.

Package

json.

Source

objects.lisp.

Special Variable: *real-handler*

Designator for a function of 1 string argument (real token).

Package

json.

Source

decoder.lisp.

Special Variable: *string-char-handler*

Designator for a function of 1 character argument (String char).

Package

json.

Source

decoder.lisp.

Special Variable: *string-scope-variables*

A list of symbols naming dynamic variables which should be re-bound in the scope of every JSON String.

Package

json.

Source

decoder.lisp.

Special Variable: *use-strict-json-rules*

If non-nil, signal error on unrecognized escape sequences in JSON Strings. If nil, translate any such sequence to the char after slash.

Package

json.

Source

common.lisp.


6.1.3 Macros

Macro: as-array-member ((&optional stream) &body body)

BODY should be a program which encodes exactly one JSON datum to STREAM. AS-ARRAY-MEMBER ensures that the datum is properly formatted as a Member of an Array, i. e. separated by comma from any preceding or following Member.

Package

json.

Source

encoder.lisp.

Macro: as-object-member ((key &optional stream) &body body)

BODY should be a program which writes exactly one JSON datum to STREAM. AS-OBJECT-MEMBER ensures that the datum is properly formatted as a Member of an Object, i. e. preceded by the (encoded) KEY and colon, and separated by comma from any preceding or following Member.

Package

json.

Source

encoder.lisp.

Macro: bind-custom-vars ((&rest customizations) &body body)
Package

json.

Source

common.lisp.

Macro: current-decoder (&rest keys)

Capture current values of custom variables and return a custom decoder which restores these values in its dynamic environment.

Package

json.

Source

decoder.lisp.

Macro: custom-decoder (&rest customizations)

Return a function which is like DECODE-JSON called in a dynamic environment with the given CUSTOMIZATIONS.

Package

json.

Source

decoder.lisp.

Macro: def-json-rpc-encoding (keyword (var) &rest body)

Define a new encoding keyword, KEYWORD. When the encoding is invoked, the raw value will be bound to VAR, and the BODY should return the encoded value.

Package

json-rpc.

Source

json-rpc.lisp.

Macro: defun-json-rpc (name type lambda-list &body body)

Defines a function and registers it as a json-rpc target.

Package

json-rpc.

Source

json-rpc.lisp.

Macro: json-bind ((&rest vars) json-source &body body)
Package

json.

Source

utils.lisp.

Macro: set-custom-vars (&rest customizations)
Package

json.

Source

common.lisp.

Macro: with-array ((&optional stream) &body body)

Open a JSON Array, run BODY, then close the Array. Inside the BODY, AS-ARRAY-MEMBER or ENCODE-ARRAY-MEMBER should be called to encode Members of the Array.

Package

json.

Source

encoder.lisp.

Macro: with-custom-decoder-level ((&rest customizations) &body body)

Execute BODY in a dynamic environment such that, when nested structures are decoded, the outermost level is decoded with the given custom handlers (CUSTOMIZATIONS) whereas inner levels are decoded in the usual way.

Package

json.

Source

decoder.lisp.

Macro: with-decoder-simple-clos-semantics (&body body)

Execute BODY in a dynamic environement where the decoder semantics is such as set by SET-DECODER-SIMPLE-CLOS-SEMANTICS.

Package

json.

Source

decoder.lisp.

Macro: with-decoder-simple-list-semantics (&body body)

Execute BODY in a dynamic environement where the decoder semantics is such as set by SET-DECODER-SIMPLE-LIST-SEMANTICS.

Package

json.

Source

decoder.lisp.

Macro: with-explicit-encoder (&body body)
Package

json.

Source

encoder.lisp.

Macro: with-guessing-encoder (&body body)
Package

json.

Source

encoder.lisp.

Macro: with-local-class-registry ((&key inherit) &body body)

Run BODY in a dynamic environment where *CLASS-REGISTRY* is a temporary local list. If :INHERIT is non-null, the local registry shall initially have the same content as the exterior *CLASS-REGISTRY*, otherwise it shall be NIL.

Package

json.

Source

objects.lisp.

Macro: with-object ((&optional stream) &body body)

Open a JSON Object, run BODY, then close the Object. Inside the BODY, AS-OBJECT-MEMBER or ENCODE-OBJECT-MEMBER should be called to encode Members of the Object.

Package

json.

Source

encoder.lisp.

Macro: with-shadowed-custom-vars (&body body)
Package

json.

Source

common.lisp.

Macro: with-substitute-printed-representation-restart ((object stream) &body body)

Establish a SUBSTITUTE-PRINTED-REPRESENTATION restart for OBJECT and execute BODY.

Package

json.

Source

encoder.lisp.


6.1.4 Ordinary functions

Function: camel-case-to-lisp (string)

Take a camel-case string and convert it into a string with Lisp-style hyphenation.

Package

json.

Source

camel-case.lisp.

Function: clear-class-registry ()

Reset the *CLASS-REGISTRY* to NIL.

Package

json.

Source

objects.lisp.

Function: clear-exported ()
Package

json-rpc.

Source

json-rpc.lisp.

Function: decode-json (&optional stream)

Read a JSON Value from STREAM and return the corresponding Lisp value.

Package

json.

Source

decoder.lisp.

Function: decode-json-from-source (source &optional decoder)

Decode a JSON Value from SOURCE using the value of DECODER (default ’DECODE-JSON) as decoder function. If the SOURCE is a string, the input is from this string; if it is a pathname, the input is from the file that it names; otherwise, a stream is expected as SOURCE.

Package

json.

Source

decoder.lisp.

Function: decode-json-from-string (json-string)

Read a JSON Value from JSON-STRING and return the corresponding Lisp value.

Package

json.

Source

decoder.lisp.

Function: decode-json-strict (&optional stream)

Same as DECODE-JSON, but allow only Objects or Arrays on the top level, no junk afterwards.

Package

json.

Source

decoder.lisp.

Function: encode-array-member (object &optional stream)

Encode OBJECT as the next Member of the innermost JSON Array opened with WITH-ARRAY in the dynamic context. OBJECT is encoded using the ENCODE-JSON generic function, so it must be of a type for which an ENCODE-JSON method is defined.

Package

json.

Source

encoder.lisp.

Function: encode-json-alist (alist &optional stream)

Write the JSON representation (Object) of ALIST to STREAM (or to *JSON-OUTPUT*). Return NIL.

Package

json.

Source

encoder.lisp.

Function: encode-json-alist-to-string (alist)

Return the JSON representation (Object) of ALIST as a string.

Package

json.

Source

encoder.lisp.

Function: encode-json-plist (plist &optional stream)

Write the JSON representation (Object) of PLIST to STREAM (or to *JSON-OUTPUT*). Return NIL.

Package

json.

Source

encoder.lisp.

Function: encode-json-plist-to-string (plist)

Return the JSON representation (Object) of PLIST as a string.

Package

json.

Source

encoder.lisp.

Function: encode-json-to-string (object)

Return the JSON representation of OBJECT as a string.

Package

json.

Source

encoder.lisp.

Function: encode-object-member (key value &optional stream)

Encode KEY and VALUE as a Member pair of the innermost JSON Object opened with WITH-OBJECT in the dynamic context. KEY and VALUE are encoded using the ENCODE-JSON generic function, so they both must be of a type for which an ENCODE-JSON method is defined. If KEY does not encode to a String, its JSON representation (as a string) is encoded over again.

Package

json.

Source

encoder.lisp.

Function: export-as-json-rpc (func function-name &optional type)

Registers a lambda function FUNC as a json-rpc function.
TYPE determines how the return value of FUNC should be interpreted: :explicit using the explicit encoder syntax,
:guessing using the guessing encode syntax
:streaming as a raw JSON string.

Package

json-rpc.

Source

json-rpc.lisp.

Function: invoke-rpc (json-source)

A remote method is invoked by sending a request to a remote service. The request is a single object serialized using JSON.

It has three properties:

* method - A String containing the name of the method to be invoked.
* params - An Array of objects to pass as arguments to the method.
* id - The request id. This can be of any type. It is used to match the response with the request that it is replying to.

Package

json-rpc.

Source

json-rpc.lisp.

Function: invoke-rpc-parsed (method params &optional id)
Package

json-rpc.

Source

json-rpc.lisp.

Function: json-bool (value)

Intended for the JSON-EXPLICT-ENCODER. Converts a non-nil value to a value (:true) that creates a json true value when used in the explict encoder. Or (:false).

Package

json.

Source

encoder.lisp.

Function: json-intern (string)

Intern STRING in the current *JSON-SYMBOLS-PACKAGE*.

Package

json.

Source

common.lisp.

Function: json-or-null (value)

Intended for the JSON-EXPLICT-ENCODER. Returns a non-nil value as itself, or a nil value as a json null-value

Package

json.

Source

encoder.lisp.

Function: json-syntax-error (stream format-control &rest format-arguments)

Signal a JSON-SYNTAX-ERROR condition.

Package

json.

Source

decoder.lisp.

Function: lisp-to-camel-case (string)

Take a string with Lisp-style hyphentation and convert it to camel case. This is an inverse of CAMEL-CASE-TO-LISP.

Package

json.

Source

camel-case.lisp.

Function: safe-json-intern (string)

The default json-intern is not safe. Interns of many
unique symbols could potentially use a lot of memory.
An attack could exploit this by submitting something that is passed through cl-json that has many very large, unique symbols. This version is safe in that respect because it only allows symbols that already exists.

Package

json.

Source

common.lisp.

Function: send-error (errmsg code &optional condition)
Package

json-rpc.

Source

json-rpc.lisp.

Function: send-error-object (explicit-errobject &optional condition)
Package

json-rpc.

Source

json-rpc.lisp.

Function: send-internal-error (&optional condition)
Package

json-rpc.

Source

json-rpc.lisp.

Function: send-nothing (&optional condition)
Package

json-rpc.

Source

json-rpc.lisp.

Function: set-decoder-simple-clos-semantics ()

Set the decoder semantics to the following:
* Strings and Numbers are decoded naturally, reals becoming floats. * The literal name true is decoded to T, false and null to NIL. * Arrays are decoded to sequences of the type *JSON-ARRAY-TYPE*. * Objects are decoded to CLOS objects. Object keys are converted by the function *JSON-IDENTIFIER-NAME-TO-LISP*. If a JSON Object has a field whose key matches *PROTOTYPE-NAME*, the class of the CLOS object and the package wherein to intern slot names are inferred from the corresponding value which must be a valid prototype. Otherwise, a FLUID-OBJECT is constructed whose slot names are interned in *JSON-SYMBOLS-PACKAGE*.

Package

json.

Source

decoder.lisp.

Function: set-decoder-simple-list-semantics ()

Set the decoder semantics to the following:
* Strings and Numbers are decoded naturally, reals becoming floats. * The literal name true is decoded to T, false and null to NIL. * Arrays are decoded to sequences of the type *JSON-ARRAY-TYPE*. * Objects are decoded to alists. Object keys are converted by the function *JSON-IDENTIFIER-NAME-TO-LISP* and then interned in the package *JSON-SYMBOLS-PACKAGE*.

Package

json.

Source

decoder.lisp.

Function: simplified-camel-case-to-lisp (camel-string)

Insert - between lowercase and uppercase chars. Ignore _ + * and several consecutive uppercase.

Package

json.

Source

camel-case.lisp.

Function: stream-array-member-encoder (stream &optional encoder)

Return a function which takes an argument and encodes it to STREAM as a Member of an Array. The encoding function is taken from the value of ENCODER (default is #’ENCODE-JSON).

Package

json.

Source

encoder.lisp.

Function: stream-object-member-encoder (stream &optional encoder)

Return a function which takes two arguments and encodes them to STREAM as a Member of an Object (String : Value pair).

Package

json.

Source

encoder.lisp.

Function: unencodable-value-error (value &optional context)

Signal an UNENCODABLE-VALUE-ERROR.

Package

json.

Source

encoder.lisp.

Function: unknown-symbol-error (string)
Package

json.

Source

common.lisp.

Function: use-explicit-encoder ()
Package

json.

Source

encoder.lisp.

Function: use-guessing-encoder ()
Package

json.

Source

encoder.lisp.


6.1.5 Generic functions

Generic Function: encode-json (object &optional stream)

Write a JSON representation of OBJECT to STREAM and return NIL.

Package

json.

Source

encoder.lisp.

Methods
Method: encode-json ((o standard-object) &optional stream)

Write the JSON representation (Object) of the CLOS object O to STREAM (or to *JSON-OUTPUT*).

Method: encode-json ((h hash-table) &optional stream)

Write the JSON representation (Object) of the hash table H to STREAM (or to *JSON-OUTPUT*).

Method: encode-json ((s sequence) &optional stream)

Write the JSON representation (Array) of the sequence S (not an alist) to STREAM (or to *JSON-OUTPUT*).

Method: encode-json ((s list) &optional stream)

Write the JSON representation of the list S to STREAM (or to *JSON-OUTPUT*), using one of the two rules specified by
first calling USE-GUESSING-ENCODER or USE-EXPLICIT-ENCODER. The guessing encoder: If S is a list encode S as a JSON Array, if S is a dotted list encode it as an Object (per ENCODE-JSON-ALIST). The explicit decoder: If S is a list, the first symbol defines the encoding:
If (car S) is ’TRUE return a JSON true value.
If (car S) is ’FALSE return a JSON false value.
If (car S) is ’NULL return a JSON null value.
If (car S) is ’JSON princ the strings in (cdr s) to stream
If (car S) is ’LIST or ’ARRAY encode (cdr S) as a a JSON Array. If (car S) is ’OBJECT encode (cdr S) as A JSON Object, interpreting (cdr S) either as an A-LIST or a P-LIST.

Method: encode-json ((s symbol) &optional stream)

Write the JSON representation of the symbol S to STREAM (or to *JSON-OUTPUT*). If S is boolean, a boolean literal is written. Otherwise, the name of S is passed to *LISP-IDENTIFIER-NAME-TO-JSON* and the result is written as String.

Method: encode-json ((c character) &optional stream)

JSON does not define a character type, we encode characters as Strings.

Method: encode-json ((s string) &optional stream)

Write the JSON representation of the string S to STREAM (or to *JSON-OUTPUT*).

Method: encode-json ((nr number) &optional stream)

Write the JSON representation of the number NR to STREAM (or to *JSON-OUTPUT*).

Method: encode-json (anything &optional stream)

If OBJECT is not handled by any specialized encoder signal an error which the user can correct by choosing to encode the string which is the printed representation of the OBJECT.

Generic Function: make-object (bindings class &optional superclasses)

If CLASS is not NIL, create an instance of that
class. Otherwise, create a fluid object whose class has the given SUPERCLASSES (null list by default). In either case, populate the resulting object using BINDINGS (an alist of slot names and values).

Package

json.

Source

objects.lisp.

Methods
Method: make-object (bindings (class symbol) &optional superclasses)

If the CLASS is given as a symbol, find it and resort to the usual procedure.

Method: make-object (bindings (class (eql #<structure-class common-lisp:hash-table>)) &optional superclasses)

If the CLASS is given as ’HASH-TABLE, return the BINDINGS as hash table.

Method: make-object (bindings (class (eql #<built-in-class common-lisp:list>)) &optional superclasses)

If the CLASS is given as ’LIST, return the BINDINGS as plist.

Method: make-object (bindings (class (eql #<built-in-class common-lisp:cons>)) &optional superclasses)

If the CLASS is given as ’CONS, return the BINDINGS as alist.

Method: make-object (bindings class &optional superclasses)

If the CLASS is explicitly specified, just create and populate an instance, discarding any of the BINDINGS which do not correspond to the slots of that CLASS.

Method: make-object (bindings (class (eql nil)) &optional superclasses)

Create a FLUID-OBJECT with the slots given by BINDINGS and whose class has all the given SUPERCLASSES. If the current *CLASS-REGISTRY* has a member with exactly the same direct superclasses, it is updated to include all the given slots. Otherwise, a new FLUID-CLASS is allocated and added to the *CLASS-REGISTRY*.

Generic Function: make-object-prototype (object &optional slot-names)

Return a PROTOTYPE describing the OBJECT’s class or superclasses, and the package into which the names of the class / superclasses and of the OBJECT’s slots are to be interned.

Package

json.

Source

objects.lisp.

Methods
Method: make-object-prototype ((object prototype) &optional slot-names)

Prototypes are not to be given their own prototypes, otherwise we would proceed ad malinfinitum.

Method: make-object-prototype ((class-name symbol) &optional slot-names)

Return a PROTOTYPE of an object of the class named by CLASS-NAME.

Method: make-object-prototype (object &optional slot-names)

Return a PROTOTYPE describing the OBJECT’s class or superclasses, and the package into which the names of the class / superclasses and of the OBJECT’s slots are to be interned.


6.1.6 Standalone methods

Method: add-direct-subclass ((superclass class) (subclass fluid-class))

Fluid classes are thought to be anonymous, and so should not be registered in the superclass.

Package

sb-mop.

Source

objects.lisp.

Method: compute-class-precedence-list ((class fluid-class))

Objects of fluid classes are fluid objects.

Package

sb-mop.

Source

objects.lisp.

Method: make-load-form ((prototype prototype) &optional environment)
Source

objects.lisp.

Method: remove-direct-subclass ((superclass class) (subclass fluid-class))

Fluid classes are thought to be anonymous, and so should not be registered in the superclass.

Package

sb-mop.

Source

objects.lisp.

Method: slot-missing ((class fluid-class) (object fluid-object) name (op (eql setf)) &optional new-value)

On attempting to set a missing slot, add the slot to the class, then repeat SETF.

Source

objects.lisp.

Method: slot-missing ((class fluid-class) (object fluid-object) name (op (eql slot-value)) &optional new-value)

On attempting to get the value of a missing slot, raise a slot-unbound error.

Source

objects.lisp.

Method: slot-missing ((class fluid-class) (object fluid-object) name (op (eql slot-makunbound)) &optional new-value)

A missing slot in a fluid class is considered unbound.

Source

objects.lisp.

Method: slot-missing ((class fluid-class) (object fluid-object) name (op (eql slot-boundp)) &optional new-value)

A missing slot in a fluid class is considered unbound.

Source

objects.lisp.

Method: validate-superclass ((class fluid-class) (superclass standard-class))

Any fluid class is also a standard class.

Package

sb-mop.

Source

objects.lisp.


6.1.7 Conditions

Condition: json-rpc-call-error
Package

json-rpc.

Source

json-rpc.lisp.

Direct superclasses

error.

Direct methods

encapsulated-error.

Direct slots
Slot: encapsulated-error
Initargs

:error

Readers

encapsulated-error.

Writers

This slot is read-only.

Condition: json-syntax-error

Signalled when non-well-formed JSON data are encountered.

Package

json.

Source

decoder.lisp.

Direct superclasses
  • simple-error.
  • stream-error.
Direct methods

stream-error-stream-file-position.

Direct slots
Slot: stream-file-position
Initargs

:stream-file-position

Readers

stream-error-stream-file-position.

Writers

This slot is read-only.

Condition: no-char-for-code

Signalled when, in a JSON String, an escaped code point (uXXXX)
is encountered which is greater than the application’s CHAR-CODE-LIMIT or for which CODE-CHAR returns NIL.

Package

json.

Source

decoder.lisp.

Direct superclasses

error.

Direct methods

offending-code.

Direct slots
Slot: offending-code
Initargs

:code

Readers

offending-code.

Writers

This slot is read-only.

Condition: unencodable-value-error

Signalled when a datum is passed to ENCODE-JSON (or another encoder function) which actually cannot be encoded.

Package

json.

Source

encoder.lisp.

Direct superclasses

type-error.

Direct methods
Direct Default Initargs
InitargValue
:expected-typet
Direct slots
Slot: context
Initargs

:context

Readers

unencodable-value-error-context.

Writers

(setf unencodable-value-error-context).

Condition: unknown-symbol-error

Signalled by safe-json-intern when a symbol that is not already interned in *json-symbols-package* is found.

Package

json.

Source

common.lisp.

Direct superclasses

parse-error.

Direct methods
Direct slots
Slot: datum
Initargs

:datum

Readers

unknown-symbol-error-datum.

Writers

(setf unknown-symbol-error-datum).


6.1.8 Classes

Class: fluid-class

A class to whose instances arbitrary new slots may be added on the fly.

Package

json.

Source

objects.lisp.

Direct superclasses

standard-class.

Direct methods
Class: fluid-object

Any instance of a fluid class.

Package

json.

Source

objects.lisp.

Direct methods
Class: prototype

A PROTOTYPE contains metadata for an object’s class
in a format easily serializable to JSON: either the name of the class as a string or (if it is anonymous) the names of the superclasses as a list of strings; and the name of the Lisp package into which the names of the class’s slots and the name of the class / superclasses are to be interned.

Package

json.

Source

objects.lisp.

Direct methods
Direct Default Initargs
InitargValue
:lisp-classnil
:lisp-superclassesnil
:lisp-packagenil
Direct slots
Slot: lisp-class
Initargs

:lisp-class

Readers

lisp-class.

Writers

This slot is read-only.

Slot: lisp-superclasses
Initargs

:lisp-superclasses

Readers

lisp-superclasses.

Writers

This slot is read-only.

Slot: lisp-package
Initargs

:lisp-package

Readers

lisp-package.

Writers

This slot is read-only.


6.2 Internals


6.2.1 Constants

Constant: +empty-array+
Package

json-rpc.

Source

json-rpc.lisp.


6.2.2 Special variables

Special Variable: *accumulator*

List or vector where elements are stored.

Package

json.

Source

decoder.lisp.

Special Variable: *accumulator-last*

If *ACCUMULATOR* is a list, this refers to its last cons.

Package

json.

Source

decoder.lisp.

Special Variable: *cl-json-directory*
Package

json-system.

Source

cl-json.asd.

Special Variable: *class-registry*

A list of anonymous fluid classes, one member for every distinct combination of direct superclasses.

Package

json.

Source

objects.lisp.

Special Variable: *custom-vars*
Package

json.

Source

common.lisp.

Special Variable: *json-aggregate-context*

NIL outside of any aggregate environment, ’ARRAY or ’OBJECT within the respective environments.

Package

json.

Source

encoder.lisp.

Special Variable: *json-aggregate-first*

T when the first member of a JSON Object or Array is encoded, afterwards NIL.

Package

json.

Source

encoder.lisp.

Special Variable: *json-list-encoder-fn*
Package

json.

Source

encoder.lisp.

Special Variable: *json-rpc-functions*
Package

json-rpc.

Source

json-rpc.lisp.

Special Variable: *prototype*

When NIL, the Object being decoded does not (yet?) have a prototype. When T, the decoder should get ready to decode a prototype field. Otherwise, the value should be a prototype for the object being decoded.

Package

json.

Source

decoder.lisp.

Special Variable: *prototype-prototype*

The prototype for a prototype object.

Package

json.

Source

decoder.lisp.

Special Variable: +json-lisp-escaped-chars+

Mapping between JSON String escape sequences and Lisp chars.

Package

json.

Source

common.lisp.

Special Variable: +json-lisp-symbol-tokens+

Mapping between JSON literal names and Lisp boolean values.

Package

json.

Source

common.lisp.


6.2.3 Macros

Macro: aggregate-scope-progv (variables &body body)

Establish a dynamic environment where all VARIABLES are freshly bound (to their current values), and execute BODY in it, returning the result.

Package

json.

Source

decoder.lisp.

Macro: def-restart (restart-name &rest params)
Package

json-rpc.

Source

json-rpc.lisp.

Macro: defconstant (name value &optional doc)
Package

json-rpc.

Source

json-rpc.lisp.

Macro: define-custom-var ((key name) &rest other-args)
Package

json.

Source

common.lisp.

Macro: escaped-char-dispatch (char &key code-handler default-handler)

Compiles the escaped character alist to a (CASE ...) match expression.

Package

json.

Source

decoder.lisp.

Macro: let-gensyms ((&rest names) &body body)
Package

json.

Source

common.lisp.

Macro: loop-on-custom ((key var &optional value) &rest clauses)
Package

json.

Source

common.lisp.

Macro: with-aggregate ((context begin-char end-char &optional stream) &body body)

Run BODY to encode a JSON aggregate type, delimited by BEGIN-CHAR and END-CHAR.

Package

json.

Source

encoder.lisp.

Macro: with-local-encoder (&body body)
Package

json.

Source

encoder.lisp.


6.2.4 Ordinary functions

Function: accumulator-add (element)

Add ELEMENT to the end of the list accumulator.

Package

json.

Source

decoder.lisp.

Function: accumulator-add-key (key)

Add a cons whose CAR is KEY to the end of the list accumulator.

Package

json.

Source

decoder.lisp.

Function: accumulator-add-key-or-set-prototype (key)

If KEY (in a JSON Object being decoded) matches *PROTOTYPE-NAME*, prepare to decode the corresponding Value as a PROTOTYPE object. Otherwise, do the same as ACCUMULATOR-ADD-KEY.

Package

json.

Source

decoder.lisp.

Function: accumulator-add-value (value)

Set the CDR of the most recently accumulated cons to VALUE.

Package

json.

Source

decoder.lisp.

Function: accumulator-add-value-or-set-prototype (value)

If VALUE (in a JSON Object being decoded) corresponds to a key which matches *PROTOTYPE-NAME*, set VALUE to be the prototype of the Object. Otherwise, do the same as ACCUMULATOR-ADD-VALUE.

Package

json.

Source

decoder.lisp.

Function: accumulator-get ()

Return all values accumulated so far in the list accumulator as a list.

Package

json.

Source

decoder.lisp.

Function: accumulator-get-object ()

Return a CLOS object, using keys and values accumulated so far in the list accumulator as slot names and values, respectively. If the JSON Object had a prototype field infer the class of the object and the package wherein to intern slot names from the prototype. Otherwise, create a FLUID-OBJECT with slots interned in *JSON-SYMBOLS-PACKAGE*.

Package

json.

Source

decoder.lisp.

Function: accumulator-get-sequence ()

Return all values accumulated so far in the list accumulator as *JSON-ARRAY-TYPE*.

Package

json.

Source

decoder.lisp.

Function: accumulator-get-string ()

Return all values accumulated so far in the list accumulator as *JSON-ARRAY-TYPE*.

Package

json.

Source

decoder.lisp.

Function: camel-case-split (string)

Assume STRING is in camel case, and split it into largest possible “homogenous” parts. A homogenous part consists either a) of upper-case alphabetic chars; or b) of lower-case alphabetic chars with an optional initial upper-case; or c) of decimal digits; or d) of a single non-alphanumeric char. The return value is a list of
pairs (CATEGORY . PART) where CATEGORY is one of the keywords :UPPER, :UPPER-1, :LOWER, :NUMERIC, :MIXED, and PART is a substring of STRING.

Package

json.

Source

camel-case.lisp.

Function: camel-case-transform (parts &optional cat-before)

Take a list of PARTS (as returned by CAMEL-CASE-SPLIT) and transform it into a string with Lisp-style hyphenation, assuming that some initial portion of it does not contain :UPPER parts.

Package

json.

Source

camel-case.lisp.

Function: camel-case-transform-all-caps (parts &optional cat-before from-numeric)

Take a list of PARTS (as returned by CAMEL-CASE-SPLIT) and transform it into a string with Lisp-style hyphenation, assuming that some initial portion of it does not contain :MIXED parts.

Package

json.

Source

camel-case.lisp.

Function: custom-key-to-variable (key)
Package

json.

Source

common.lisp.

Function: decode-json-array (stream)

Read comma-separated sequence of JSON Values until a closing bracket, calling array handlers as it goes.

Package

json.

Source

decoder.lisp.

Function: decode-json-object (stream)

Read comma-separated sequence of JSON String:Value pairs until a closing brace, calling object handlers as it goes.

Package

json.

Source

decoder.lisp.

Function: decode-json-string (stream)

Read JSON String characters / escape sequences until a closing double quote, calling string handlers as it goes.

Package

json.

Source

decoder.lisp.

Function: encode-json-list-explicit-encoder (s stream)
Package

json.

Source

encoder.lisp.

Function: encode-json-list-guessing-encoder (s stream)

Write the JSON representation of the list S to STREAM (or to *JSON-OUTPUT*). If S is not encodable as a JSON Array, try to encode it as an Object (per ENCODE-JSON-ALIST).

Package

json.

Source

encoder.lisp.

Function: ensure-fluid-class-with-slots (slots superclasses &optional extant-class)

Create or update a fluid class, ensuring that it has (at least) all the given SLOTS and SUPERCLASSES.

Package

json.

Source

objects.lisp.

Function: find-class* (class-designator)

Like FIND-CLASS, but allow self-designating classes for the argument, and assert that the resulting class is a STANDARD-CLASS.

Package

json.

Source

objects.lisp.

Function: init-accumulator ()

Initialize a list accumulator.

Package

json.

Source

decoder.lisp.

Function: init-accumulator-and-prototype ()

Initialize a list accumulator and a prototype.

Package

json.

Source

decoder.lisp.

Function: init-string-stream-accumulator ()

Initialize a string-stream accumulator.

Package

json.

Source

decoder.lisp.

Function: json-bind-level-customizations (level-keys value-required decoder validator key-handler value-handler pass)
Package

json.

Source

utils.lisp.

Function: json-boolean-to-lisp (token)

Take a literal name token and convert it to a boolean value.

Package

json.

Source

decoder.lisp.

Function: make-and-populate-instance (class bindings)

Make an instance of the given CLASS, and set its slots to given values. BINDINGS must be a list of pairs whose CARs are slot names and CDRs are the respective values. If no slot of a given name is defined in the CLASS, the corresponding value is discarded.

Package

json.

Source

objects.lisp.

Function: make-json-rpc-error-object-1.1 (message &key code error-object)

This code is based on the Working Draft 7 August 2006 of Json-rpc 1.1 specification. http://json-rpc.org/wd/JSON-RPC-1-1-WD-20060807.html

Package

json-rpc.

Source

json-rpc.lisp.

Function: make-json-rpc-error-object-2.0 (&key message code data error-object)
Package

json-rpc.

Source

json-rpc.lisp.

Function: make-rpc-response (&key result error id)

When the method invocation completes, the service must reply with a response. The response is a single object serialized using JSON.

It has three properties:

* result - The Object that was returned by the invoked method. This must be null in case there was an error invoking the method. * error - An Error object(unspecified in json-rpc 1.0) if there was an error invoking the method. Null if there was no error. * id - This must be the same id as the request it is responding to.

Package

json-rpc.

Source

json-rpc.lisp.

Function: map-slots (function object)

Call FUNCTION on the name and value of every bound slot in OBJECT.

Package

json.

Source

objects.lisp.

Function: max-package (symbols &key initial-value)

Try to find a package P such that the names of the given SYMBOLS, when interned in P, yield the same symbols. If no such package exists, return an unspecific value and issue a warning.

Package

json.

Source

objects.lisp.

Function: maybe-add-prototype (object prototype)

If the PROTOTYPE is not NIL, and the OBJECT has a slot to accept it, do set it. Return OBJECT.

Package

json.

Source

objects.lisp.

Function: next-aggregate-member (context stream)

Between two members of an Object or Array, print a comma separator.

Package

json.

Source

encoder.lisp.

Function: package-name* (package)

Same as PACKAGE-NAME, but ensure that the result is a symbol.

Package

json.

Source

objects.lisp.

Function: parse-number (token)

Take a number token and convert it to a numeric value.

Package

json.

Source

decoder.lisp.

Function: peek-json-token (stream)

Return 2 values: the category and the first character of the next token available in the given STREAM. Unlike READ-JSON-TOKEN, this function can not discriminate between integers and reals (hence, it returns a single :NUMBER category), and cannot check whether the next available symbol is a valid boolean or not (hence, the category for such tokens is :SYMBOL).

Package

json.

Source

decoder.lisp.

Function: range-keys (var-keys)
Package

json.

Source

utils.lisp.

Function: read-json-name-token (stream)

Read a JSON literal name token from the given STREAM, and return 2 values: the token category (:BOOLEAN) and the token itself, as a string.

Package

json.

Source

decoder.lisp.

Function: read-json-number-token (stream)

Read a JSON number token from the given STREAM, and return 2 values: the token category (:INTEGER or :REAL) and the token itself, as a string.

Package

json.

Source

decoder.lisp.

Function: read-json-string-char (stream)

Read a JSON String char (or escape sequence) from the STREAM and return it. If an end of string (unescaped quote) is encountered, return NIL.

Package

json.

Source

decoder.lisp.

Function: read-json-token (stream)

Read a JSON token (literal name, number or punctuation char) from the given STREAM, and return 2 values: the token category (a symbol) and the token itself, as a string or character.

Package

json.

Source

decoder.lisp.

Function: string-stream-accumulator-add (char)

Add CHAR to the end of the string-stream accumulator.

Package

json.

Source

decoder.lisp.

Function: string-stream-accumulator-get ()

Return all characters accumulated so far in a string-stream accumulator and close the stream.

Package

json.

Source

decoder.lisp.

Function: write-json-chars (s stream)

Write JSON representations (chars or escape sequences) of characters in string S to STREAM.

Package

json.

Source

encoder.lisp.

Function: write-json-number (nr stream)

Write the JSON representation of the number NR to STREAM.

Package

json.

Source

encoder.lisp.

Function: write-json-string (s stream)

Write a JSON representation (String) of S to STREAM.

Package

json.

Source

encoder.lisp.


6.2.5 Generic functions

Generic Reader: encapsulated-error (condition)
Package

json-rpc.

Methods
Reader Method: encapsulated-error ((condition json-rpc-call-error))
Source

json-rpc.lisp.

Target Slot

encapsulated-error.

Generic Function: encode-json-rpc-value (raw-value encoding)

Translate RAW-VALUE according to JSON-RPC value encoding ENCODING

Package

json-rpc.

Source

json-rpc.lisp.

Methods
Method: encode-json-rpc-value (raw-val (keyword (eql :array)))
Method: encode-json-rpc-value (raw-val (keyword (eql :boolean)))
Method: encode-json-rpc-value :before (raw-value encoding)
Method: encode-json-rpc-value (raw-value (encoding (eql :guessing)))
Method: encode-json-rpc-value (raw-value (encoding (eql :streaming)))
Method: encode-json-rpc-value (raw-value (encoding (eql :explicit)))
Generic Function: json-rpc-encoding-p (keyword)

Is KEYWORD a valid JSON-RPC value encoding?

Package

json-rpc.

Source

json-rpc.lisp.

Methods
Method: json-rpc-encoding-p ((keyword (eql :array)))
Method: json-rpc-encoding-p ((keyword (eql :boolean)))
Method: json-rpc-encoding-p (keyword)

Default is no.

Method: json-rpc-encoding-p ((keyword (eql :guessing)))
Method: json-rpc-encoding-p ((keyword (eql :streaming)))
Method: json-rpc-encoding-p ((keyword (eql :explicit)))
Generic Reader: lisp-class (object)
Package

json.

Methods
Reader Method: lisp-class ((prototype prototype))

automatically generated reader method

Source

objects.lisp.

Target Slot

lisp-class.

Generic Reader: lisp-package (object)
Package

json.

Methods
Reader Method: lisp-package ((prototype prototype))

automatically generated reader method

Source

objects.lisp.

Target Slot

lisp-package.

Generic Reader: lisp-superclasses (object)
Package

json.

Methods
Reader Method: lisp-superclasses ((prototype prototype))

automatically generated reader method

Source

objects.lisp.

Target Slot

lisp-superclasses.

Generic Reader: offending-code (condition)
Package

json.

Methods
Reader Method: offending-code ((condition no-char-for-code))
Source

decoder.lisp.

Target Slot

offending-code.

Generic Reader: stream-error-stream-file-position (condition)
Package

json.

Methods
Reader Method: stream-error-stream-file-position ((condition json-syntax-error))
Source

decoder.lisp.

Target Slot

stream-file-position.

Generic Reader: unencodable-value-error-context (condition)
Generic Writer: (setf unencodable-value-error-context) (condition)
Package

json.

Methods
Reader Method: unencodable-value-error-context ((condition unencodable-value-error))
Writer Method: (setf unencodable-value-error-context) ((condition unencodable-value-error))
Source

encoder.lisp.

Target Slot

context.

Generic Reader: unknown-symbol-error-datum (condition)
Generic Writer: (setf unknown-symbol-error-datum) (condition)
Package

json.

Methods
Reader Method: unknown-symbol-error-datum ((condition unknown-symbol-error))
Writer Method: (setf unknown-symbol-error-datum) ((condition unknown-symbol-error))
Source

common.lisp.

Target Slot

datum.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   B   C   D   E   F   G   I   J   L   M   N   O   P   R   S   U   V   W  
Index Entry  Section

(
(setf unencodable-value-error-context): Private generic functions
(setf unencodable-value-error-context): Private generic functions
(setf unknown-symbol-error-datum): Private generic functions
(setf unknown-symbol-error-datum): Private generic functions

A
accumulator-add: Private ordinary functions
accumulator-add-key: Private ordinary functions
accumulator-add-key-or-set-prototype: Private ordinary functions
accumulator-add-value: Private ordinary functions
accumulator-add-value-or-set-prototype: Private ordinary functions
accumulator-get: Private ordinary functions
accumulator-get-object: Private ordinary functions
accumulator-get-sequence: Private ordinary functions
accumulator-get-string: Private ordinary functions
add-direct-subclass: Public standalone methods
aggregate-scope-progv: Private macros
as-array-member: Public macros
as-object-member: Public macros

B
bind-custom-vars: Public macros

C
camel-case-split: Private ordinary functions
camel-case-to-lisp: Public ordinary functions
camel-case-transform: Private ordinary functions
camel-case-transform-all-caps: Private ordinary functions
clear-class-registry: Public ordinary functions
clear-exported: Public ordinary functions
compute-class-precedence-list: Public standalone methods
current-decoder: Public macros
custom-decoder: Public macros
custom-key-to-variable: Private ordinary functions

D
decode-json: Public ordinary functions
decode-json-array: Private ordinary functions
decode-json-from-source: Public ordinary functions
decode-json-from-string: Public ordinary functions
decode-json-object: Private ordinary functions
decode-json-strict: Public ordinary functions
decode-json-string: Private ordinary functions
def-json-rpc-encoding: Public macros
def-restart: Private macros
defconstant: Private macros
define-custom-var: Private macros
defun-json-rpc: Public macros

E
encapsulated-error: Private generic functions
encapsulated-error: Private generic functions
encode-array-member: Public ordinary functions
encode-json: Public generic functions
encode-json: Public generic functions
encode-json: Public generic functions
encode-json: Public generic functions
encode-json: Public generic functions
encode-json: Public generic functions
encode-json: Public generic functions
encode-json: Public generic functions
encode-json: Public generic functions
encode-json: Public generic functions
encode-json-alist: Public ordinary functions
encode-json-alist-to-string: Public ordinary functions
encode-json-list-explicit-encoder: Private ordinary functions
encode-json-list-guessing-encoder: Private ordinary functions
encode-json-plist: Public ordinary functions
encode-json-plist-to-string: Public ordinary functions
encode-json-rpc-value: Private generic functions
encode-json-rpc-value: Private generic functions
encode-json-rpc-value: Private generic functions
encode-json-rpc-value: Private generic functions
encode-json-rpc-value: Private generic functions
encode-json-rpc-value: Private generic functions
encode-json-rpc-value: Private generic functions
encode-json-to-string: Public ordinary functions
encode-object-member: Public ordinary functions
ensure-fluid-class-with-slots: Private ordinary functions
escaped-char-dispatch: Private macros
export-as-json-rpc: Public ordinary functions

F
find-class*: Private ordinary functions
Function, accumulator-add: Private ordinary functions
Function, accumulator-add-key: Private ordinary functions
Function, accumulator-add-key-or-set-prototype: Private ordinary functions
Function, accumulator-add-value: Private ordinary functions
Function, accumulator-add-value-or-set-prototype: Private ordinary functions
Function, accumulator-get: Private ordinary functions
Function, accumulator-get-object: Private ordinary functions
Function, accumulator-get-sequence: Private ordinary functions
Function, accumulator-get-string: Private ordinary functions
Function, camel-case-split: Private ordinary functions
Function, camel-case-to-lisp: Public ordinary functions
Function, camel-case-transform: Private ordinary functions
Function, camel-case-transform-all-caps: Private ordinary functions
Function, clear-class-registry: Public ordinary functions
Function, clear-exported: Public ordinary functions
Function, custom-key-to-variable: Private ordinary functions
Function, decode-json: Public ordinary functions
Function, decode-json-array: Private ordinary functions
Function, decode-json-from-source: Public ordinary functions
Function, decode-json-from-string: Public ordinary functions
Function, decode-json-object: Private ordinary functions
Function, decode-json-strict: Public ordinary functions
Function, decode-json-string: Private ordinary functions
Function, encode-array-member: Public ordinary functions
Function, encode-json-alist: Public ordinary functions
Function, encode-json-alist-to-string: Public ordinary functions
Function, encode-json-list-explicit-encoder: Private ordinary functions
Function, encode-json-list-guessing-encoder: Private ordinary functions
Function, encode-json-plist: Public ordinary functions
Function, encode-json-plist-to-string: Public ordinary functions
Function, encode-json-to-string: Public ordinary functions
Function, encode-object-member: Public ordinary functions
Function, ensure-fluid-class-with-slots: Private ordinary functions
Function, export-as-json-rpc: Public ordinary functions
Function, find-class*: Private ordinary functions
Function, init-accumulator: Private ordinary functions
Function, init-accumulator-and-prototype: Private ordinary functions
Function, init-string-stream-accumulator: Private ordinary functions
Function, invoke-rpc: Public ordinary functions
Function, invoke-rpc-parsed: Public ordinary functions
Function, json-bind-level-customizations: Private ordinary functions
Function, json-bool: Public ordinary functions
Function, json-boolean-to-lisp: Private ordinary functions
Function, json-intern: Public ordinary functions
Function, json-or-null: Public ordinary functions
Function, json-syntax-error: Public ordinary functions
Function, lisp-to-camel-case: Public ordinary functions
Function, make-and-populate-instance: Private ordinary functions
Function, make-json-rpc-error-object-1.1: Private ordinary functions
Function, make-json-rpc-error-object-2.0: Private ordinary functions
Function, make-rpc-response: Private ordinary functions
Function, map-slots: Private ordinary functions
Function, max-package: Private ordinary functions
Function, maybe-add-prototype: Private ordinary functions
Function, next-aggregate-member: Private ordinary functions
Function, package-name*: Private ordinary functions
Function, parse-number: Private ordinary functions
Function, peek-json-token: Private ordinary functions
Function, range-keys: Private ordinary functions
Function, read-json-name-token: Private ordinary functions
Function, read-json-number-token: Private ordinary functions
Function, read-json-string-char: Private ordinary functions
Function, read-json-token: Private ordinary functions
Function, safe-json-intern: Public ordinary functions
Function, send-error: Public ordinary functions
Function, send-error-object: Public ordinary functions
Function, send-internal-error: Public ordinary functions
Function, send-nothing: Public ordinary functions
Function, set-decoder-simple-clos-semantics: Public ordinary functions
Function, set-decoder-simple-list-semantics: Public ordinary functions
Function, simplified-camel-case-to-lisp: Public ordinary functions
Function, stream-array-member-encoder: Public ordinary functions
Function, stream-object-member-encoder: Public ordinary functions
Function, string-stream-accumulator-add: Private ordinary functions
Function, string-stream-accumulator-get: Private ordinary functions
Function, unencodable-value-error: Public ordinary functions
Function, unknown-symbol-error: Public ordinary functions
Function, use-explicit-encoder: Public ordinary functions
Function, use-guessing-encoder: Public ordinary functions
Function, write-json-chars: Private ordinary functions
Function, write-json-number: Private ordinary functions
Function, write-json-string: Private ordinary functions

G
Generic Function, (setf unencodable-value-error-context): Private generic functions
Generic Function, (setf unknown-symbol-error-datum): Private generic functions
Generic Function, encapsulated-error: Private generic functions
Generic Function, encode-json: Public generic functions
Generic Function, encode-json-rpc-value: Private generic functions
Generic Function, json-rpc-encoding-p: Private generic functions
Generic Function, lisp-class: Private generic functions
Generic Function, lisp-package: Private generic functions
Generic Function, lisp-superclasses: Private generic functions
Generic Function, make-object: Public generic functions
Generic Function, make-object-prototype: Public generic functions
Generic Function, offending-code: Private generic functions
Generic Function, stream-error-stream-file-position: Private generic functions
Generic Function, unencodable-value-error-context: Private generic functions
Generic Function, unknown-symbol-error-datum: Private generic functions

I
init-accumulator: Private ordinary functions
init-accumulator-and-prototype: Private ordinary functions
init-string-stream-accumulator: Private ordinary functions
invoke-rpc: Public ordinary functions
invoke-rpc-parsed: Public ordinary functions

J
json-bind: Public macros
json-bind-level-customizations: Private ordinary functions
json-bool: Public ordinary functions
json-boolean-to-lisp: Private ordinary functions
json-intern: Public ordinary functions
json-or-null: Public ordinary functions
json-rpc-encoding-p: Private generic functions
json-rpc-encoding-p: Private generic functions
json-rpc-encoding-p: Private generic functions
json-rpc-encoding-p: Private generic functions
json-rpc-encoding-p: Private generic functions
json-rpc-encoding-p: Private generic functions
json-rpc-encoding-p: Private generic functions
json-syntax-error: Public ordinary functions

L
let-gensyms: Private macros
lisp-class: Private generic functions
lisp-class: Private generic functions
lisp-package: Private generic functions
lisp-package: Private generic functions
lisp-superclasses: Private generic functions
lisp-superclasses: Private generic functions
lisp-to-camel-case: Public ordinary functions
loop-on-custom: Private macros

M
Macro, aggregate-scope-progv: Private macros
Macro, as-array-member: Public macros
Macro, as-object-member: Public macros
Macro, bind-custom-vars: Public macros
Macro, current-decoder: Public macros
Macro, custom-decoder: Public macros
Macro, def-json-rpc-encoding: Public macros
Macro, def-restart: Private macros
Macro, defconstant: Private macros
Macro, define-custom-var: Private macros
Macro, defun-json-rpc: Public macros
Macro, escaped-char-dispatch: Private macros
Macro, json-bind: Public macros
Macro, let-gensyms: Private macros
Macro, loop-on-custom: Private macros
Macro, set-custom-vars: Public macros
Macro, with-aggregate: Private macros
Macro, with-array: Public macros
Macro, with-custom-decoder-level: Public macros
Macro, with-decoder-simple-clos-semantics: Public macros
Macro, with-decoder-simple-list-semantics: Public macros
Macro, with-explicit-encoder: Public macros
Macro, with-guessing-encoder: Public macros
Macro, with-local-class-registry: Public macros
Macro, with-local-encoder: Private macros
Macro, with-object: Public macros
Macro, with-shadowed-custom-vars: Public macros
Macro, with-substitute-printed-representation-restart: Public macros
make-and-populate-instance: Private ordinary functions
make-json-rpc-error-object-1.1: Private ordinary functions
make-json-rpc-error-object-2.0: Private ordinary functions
make-load-form: Public standalone methods
make-object: Public generic functions
make-object: Public generic functions
make-object: Public generic functions
make-object: Public generic functions
make-object: Public generic functions
make-object: Public generic functions
make-object: Public generic functions
make-object-prototype: Public generic functions
make-object-prototype: Public generic functions
make-object-prototype: Public generic functions
make-object-prototype: Public generic functions
make-rpc-response: Private ordinary functions
map-slots: Private ordinary functions
max-package: Private ordinary functions
maybe-add-prototype: Private ordinary functions
Method, (setf unencodable-value-error-context): Private generic functions
Method, (setf unknown-symbol-error-datum): Private generic functions
Method, add-direct-subclass: Public standalone methods
Method, compute-class-precedence-list: Public standalone methods
Method, encapsulated-error: Private generic functions
Method, encode-json: Public generic functions
Method, encode-json: Public generic functions
Method, encode-json: Public generic functions
Method, encode-json: Public generic functions
Method, encode-json: Public generic functions
Method, encode-json: Public generic functions
Method, encode-json: Public generic functions
Method, encode-json: Public generic functions
Method, encode-json: Public generic functions
Method, encode-json-rpc-value: Private generic functions
Method, encode-json-rpc-value: Private generic functions
Method, encode-json-rpc-value: Private generic functions
Method, encode-json-rpc-value: Private generic functions
Method, encode-json-rpc-value: Private generic functions
Method, encode-json-rpc-value: Private generic functions
Method, json-rpc-encoding-p: Private generic functions
Method, json-rpc-encoding-p: Private generic functions
Method, json-rpc-encoding-p: Private generic functions
Method, json-rpc-encoding-p: Private generic functions
Method, json-rpc-encoding-p: Private generic functions
Method, json-rpc-encoding-p: Private generic functions
Method, lisp-class: Private generic functions
Method, lisp-package: Private generic functions
Method, lisp-superclasses: Private generic functions
Method, make-load-form: Public standalone methods
Method, make-object: Public generic functions
Method, make-object: Public generic functions
Method, make-object: Public generic functions
Method, make-object: Public generic functions
Method, make-object: Public generic functions
Method, make-object: Public generic functions
Method, make-object-prototype: Public generic functions
Method, make-object-prototype: Public generic functions
Method, make-object-prototype: Public generic functions
Method, offending-code: Private generic functions
Method, remove-direct-subclass: Public standalone methods
Method, slot-missing: Public standalone methods
Method, slot-missing: Public standalone methods
Method, slot-missing: Public standalone methods
Method, slot-missing: Public standalone methods
Method, stream-error-stream-file-position: Private generic functions
Method, unencodable-value-error-context: Private generic functions
Method, unknown-symbol-error-datum: Private generic functions
Method, validate-superclass: Public standalone methods

N
next-aggregate-member: Private ordinary functions

O
offending-code: Private generic functions
offending-code: Private generic functions

P
package-name*: Private ordinary functions
parse-number: Private ordinary functions
peek-json-token: Private ordinary functions

R
range-keys: Private ordinary functions
read-json-name-token: Private ordinary functions
read-json-number-token: Private ordinary functions
read-json-string-char: Private ordinary functions
read-json-token: Private ordinary functions
remove-direct-subclass: Public standalone methods

S
safe-json-intern: Public ordinary functions
send-error: Public ordinary functions
send-error-object: Public ordinary functions
send-internal-error: Public ordinary functions
send-nothing: Public ordinary functions
set-custom-vars: Public macros
set-decoder-simple-clos-semantics: Public ordinary functions
set-decoder-simple-list-semantics: Public ordinary functions
simplified-camel-case-to-lisp: Public ordinary functions
slot-missing: Public standalone methods
slot-missing: Public standalone methods
slot-missing: Public standalone methods
slot-missing: Public standalone methods
stream-array-member-encoder: Public ordinary functions
stream-error-stream-file-position: Private generic functions
stream-error-stream-file-position: Private generic functions
stream-object-member-encoder: Public ordinary functions
string-stream-accumulator-add: Private ordinary functions
string-stream-accumulator-get: Private ordinary functions

U
unencodable-value-error: Public ordinary functions
unencodable-value-error-context: Private generic functions
unencodable-value-error-context: Private generic functions
unknown-symbol-error: Public ordinary functions
unknown-symbol-error-datum: Private generic functions
unknown-symbol-error-datum: Private generic functions
use-explicit-encoder: Public ordinary functions
use-guessing-encoder: Public ordinary functions

V
validate-superclass: Public standalone methods

W
with-aggregate: Private macros
with-array: Public macros
with-custom-decoder-level: Public macros
with-decoder-simple-clos-semantics: Public macros
with-decoder-simple-list-semantics: Public macros
with-explicit-encoder: Public macros
with-guessing-encoder: Public macros
with-local-class-registry: Public macros
with-local-encoder: Private macros
with-object: Public macros
with-shadowed-custom-vars: Public macros
with-substitute-printed-representation-restart: Public macros
write-json-chars: Private ordinary functions
write-json-number: Private ordinary functions
write-json-string: Private ordinary functions


A.3 Variables

Jump to:   *   +  
C   D   E   L   O   S  
Index Entry  Section

*
*accumulator*: Private special variables
*accumulator-last*: Private special variables
*aggregate-scope-variables*: Public special variables
*array-member-handler*: Public special variables
*array-scope-variables*: Public special variables
*beginning-of-array-handler*: Public special variables
*beginning-of-object-handler*: Public special variables
*beginning-of-string-handler*: Public special variables
*boolean-handler*: Public special variables
*cl-json-directory*: Private special variables
*class-registry*: Private special variables
*custom-vars*: Private special variables
*end-of-array-handler*: Public special variables
*end-of-object-handler*: Public special variables
*end-of-string-handler*: Public special variables
*identifier-name-to-key*: Public special variables
*integer-handler*: Public special variables
*internal-decoder*: Public special variables
*json-aggregate-context*: Private special variables
*json-aggregate-first*: Private special variables
*json-array-type*: Public special variables
*json-identifier-name-to-lisp*: Public special variables
*json-input*: Public special variables
*json-list-encoder-fn*: Private special variables
*json-output*: Public special variables
*json-rpc-functions*: Private special variables
*json-rpc-version*: Public special variables
*json-symbols-package*: Public special variables
*lisp-identifier-name-to-json*: Public special variables
*object-key-handler*: Public special variables
*object-scope-variables*: Public special variables
*object-value-handler*: Public special variables
*prototype*: Private special variables
*prototype-name*: Public special variables
*prototype-prototype*: Private special variables
*real-handler*: Public special variables
*string-char-handler*: Public special variables
*string-scope-variables*: Public special variables
*use-strict-json-rules*: Public special variables

+
+empty-array+: Private constants
+json-lisp-escaped-chars+: Private special variables
+json-lisp-symbol-tokens+: Private special variables
+json-rpc-1.1+: Public constants
+json-rpc-2.0+: Public constants

C
Constant, +empty-array+: Private constants
Constant, +json-rpc-1.1+: Public constants
Constant, +json-rpc-2.0+: Public constants
context: Public conditions

D
datum: Public conditions

E
encapsulated-error: Public conditions

L
lisp-class: Public classes
lisp-package: Public classes
lisp-superclasses: Public classes

O
offending-code: Public conditions

S
Slot, context: Public conditions
Slot, datum: Public conditions
Slot, encapsulated-error: Public conditions
Slot, lisp-class: Public classes
Slot, lisp-package: Public classes
Slot, lisp-superclasses: Public classes
Slot, offending-code: Public conditions
Slot, stream-file-position: Public conditions
Special Variable, *accumulator*: Private special variables
Special Variable, *accumulator-last*: Private special variables
Special Variable, *aggregate-scope-variables*: Public special variables
Special Variable, *array-member-handler*: Public special variables
Special Variable, *array-scope-variables*: Public special variables
Special Variable, *beginning-of-array-handler*: Public special variables
Special Variable, *beginning-of-object-handler*: Public special variables
Special Variable, *beginning-of-string-handler*: Public special variables
Special Variable, *boolean-handler*: Public special variables
Special Variable, *cl-json-directory*: Private special variables
Special Variable, *class-registry*: Private special variables
Special Variable, *custom-vars*: Private special variables
Special Variable, *end-of-array-handler*: Public special variables
Special Variable, *end-of-object-handler*: Public special variables
Special Variable, *end-of-string-handler*: Public special variables
Special Variable, *identifier-name-to-key*: Public special variables
Special Variable, *integer-handler*: Public special variables
Special Variable, *internal-decoder*: Public special variables
Special Variable, *json-aggregate-context*: Private special variables
Special Variable, *json-aggregate-first*: Private special variables
Special Variable, *json-array-type*: Public special variables
Special Variable, *json-identifier-name-to-lisp*: Public special variables
Special Variable, *json-input*: Public special variables
Special Variable, *json-list-encoder-fn*: Private special variables
Special Variable, *json-output*: Public special variables
Special Variable, *json-rpc-functions*: Private special variables
Special Variable, *json-rpc-version*: Public special variables
Special Variable, *json-symbols-package*: Public special variables
Special Variable, *lisp-identifier-name-to-json*: Public special variables
Special Variable, *object-key-handler*: Public special variables
Special Variable, *object-scope-variables*: Public special variables
Special Variable, *object-value-handler*: Public special variables
Special Variable, *prototype*: Private special variables
Special Variable, *prototype-name*: Public special variables
Special Variable, *prototype-prototype*: Private special variables
Special Variable, *real-handler*: Public special variables
Special Variable, *string-char-handler*: Public special variables
Special Variable, *string-scope-variables*: Public special variables
Special Variable, *use-strict-json-rules*: Public special variables
Special Variable, +json-lisp-escaped-chars+: Private special variables
Special Variable, +json-lisp-symbol-tokens+: Private special variables
stream-file-position: Public conditions


A.4 Data types

Jump to:   C   D   E   F   J   M   N   O   P   S   U  
Index Entry  Section

C
camel-case.lisp: The cl-json/src/camel-case․lisp file
cl-json: The cl-json system
cl-json.asd: The cl-json/cl-json․asd file
Class, fluid-class: Public classes
Class, fluid-object: Public classes
Class, prototype: Public classes
common.lisp: The cl-json/src/common․lisp file
Condition, json-rpc-call-error: Public conditions
Condition, json-syntax-error: Public conditions
Condition, no-char-for-code: Public conditions
Condition, unencodable-value-error: Public conditions
Condition, unknown-symbol-error: Public conditions

D
decoder.lisp: The cl-json/src/decoder․lisp file

E
encoder.lisp: The cl-json/src/encoder․lisp file

F
File, camel-case.lisp: The cl-json/src/camel-case․lisp file
File, cl-json.asd: The cl-json/cl-json․asd file
File, common.lisp: The cl-json/src/common․lisp file
File, decoder.lisp: The cl-json/src/decoder․lisp file
File, encoder.lisp: The cl-json/src/encoder․lisp file
File, json-rpc.lisp: The cl-json/src/json-rpc․lisp file
File, objects.lisp: The cl-json/src/objects․lisp file
File, package.lisp: The cl-json/src/package․lisp file
File, utils.lisp: The cl-json/src/utils․lisp file
fluid-class: Public classes
fluid-object: Public classes

J
json: The json package
json-rpc: The json-rpc package
json-rpc-call-error: Public conditions
json-rpc.lisp: The cl-json/src/json-rpc․lisp file
json-syntax-error: Public conditions
json-system: The json-system package

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

N
no-char-for-code: Public conditions

O
objects.lisp: The cl-json/src/objects․lisp file

P
Package, json: The json package
Package, json-rpc: The json-rpc package
Package, json-system: The json-system package
package.lisp: The cl-json/src/package․lisp file
prototype: Public classes

S
src: The cl-json/src module
System, cl-json: The cl-json system

U
unencodable-value-error: Public conditions
unknown-symbol-error: Public conditions
utils.lisp: The cl-json/src/utils․lisp file