The com.gigamonkeys.json Reference Manual

This is the com.gigamonkeys.json Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sat Dec 03 22:33:35 2022 GMT+0.

Table of Contents


1 Systems

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


1.1 com.gigamonkeys.json

Library for reading and writing JSON-formatted data.

Author

Peter Seibel <>

Dependencies
  • com.gigamonkeys.parser (system).
  • com.gigamonkeys.utilities (system).
Source

com.gigamonkeys.json.asd.

Child Components

2 Files

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


2.1 Lisp


2.1.1 com.gigamonkeys.json/com.gigamonkeys.json.asd

Source

com.gigamonkeys.json.asd.

Parent Component

com.gigamonkeys.json (system).

ASDF Systems

com.gigamonkeys.json.


2.1.2 com.gigamonkeys.json/packages.lisp

Source

com.gigamonkeys.json.asd.

Parent Component

com.gigamonkeys.json (system).

Packages

2.1.3 com.gigamonkeys.json/json.lisp

Dependency

packages.lisp (file).

Source

com.gigamonkeys.json.asd.

Parent Component

com.gigamonkeys.json (system).

Public Interface
Internals

2.1.4 com.gigamonkeys.json/json-builder.lisp

Dependency

packages.lisp (file).

Source

com.gigamonkeys.json.asd.

Parent Component

com.gigamonkeys.json (system).

Public Interface
Internals

3 Packages

Packages are listed by definition order.


3.1 com.gigamonkeys.json.parser

Source

packages.lisp.

Use List
  • com.gigamonkeys.parser.
  • common-lisp.
Used By List

com.gigamonkeys.json.

Public Interface
Internals

3.2 com.gigamonkeys.json

Source

packages.lisp.

Use List
Public Interface
Internals

4 Definitions

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


4.1 Public Interface


4.1.1 Special variables

Special Variable: *object-type*
Package

com.gigamonkeys.json.parser.

Source

json-builder.lisp.


4.1.2 Ordinary functions

Function: json (data)

The top-level function for converting Lisp objects into a string in the JSON format. It can convert any object that can be converted to a json-exp via the to-json generic function.

Package

com.gigamonkeys.json.

Source

json.lisp.

Function: parse-json (text)

Parse json text into Lisp objects. Hash tables are used to represent Javascript objects and vectors to represent arrays.

Package

com.gigamonkeys.json.parser.

Source

json-builder.lisp.

Function: write-json (data &optional stream)

Write DATA to STREAM in JSON format.

Package

com.gigamonkeys.json.

Source

json.lisp.


4.1.3 Generic functions

Generic Function: json-stringify (object)

Convert object directly to a JSON representation as
a string. Default methods are provided for strings, symbols (which must be keywords), and numbers but there may be situations where it is appropriate to define new methods on this function. In general, however, it is probably better to define a method on to-json to convert the object to a sexp that can be rendered as JSON.

Package

com.gigamonkeys.json.

Source

json.lisp.

Methods
Method: json-stringify ((object number))
Method: json-stringify ((object symbol))
Method: json-stringify ((object string))
Method: json-stringify (object)
Generic Function: to-json (thing)

Generic function that can convert an arbitrary Lisp
object to a json-exp, i.e. a sexp that can then be rendered as json. To make an arbitrary class convertable to JSON, add a method to this generic function that generates a json-exp.

Package

com.gigamonkeys.json.

Source

json.lisp.

Methods
Method: to-json ((thing hash-table))
Method: to-json (thing)

4.2 Internals


4.2.1 Special variables

Special Variable: *empty-object*
Package

com.gigamonkeys.json.parser.

Source

json-builder.lisp.


4.2.2 Macros

Macro: tjp (production input)
Package

com.gigamonkeys.json.parser.

Source

json-builder.lisp.


4.2.3 Ordinary functions

Function: emit-json-char (char stream)
Package

com.gigamonkeys.json.

Source

json.lisp.

Function: fix-empty-object (json)
Package

com.gigamonkeys.json.parser.

Source

json-builder.lisp.

Function: json-parser (input)
Package

com.gigamonkeys.json.parser.

Source

json-builder.lisp.


4.2.4 Generic functions

Generic Function: emit-json (object stream)

Emit object to stream as JSON.

Package

com.gigamonkeys.json.

Source

json.lisp.

Methods
Method: emit-json ((object (eql t)) stream)
Method: emit-json ((object number) stream)
Method: emit-json ((object string) stream)
Method: emit-json ((object symbol) stream)
Method: emit-json ((object vector) stream)
Method: emit-json ((object cons) stream)
Method: emit-json ((object (eql nil)) stream)
Method: emit-json (object stream)
Generic Function: finish-object (object)

Return the actual object that will be put into the data structure.

Package

com.gigamonkeys.json.parser.

Source

json-builder.lisp.

Methods
Method: finish-object ((object hash-table))
Method: finish-object ((object vector))
Generic Function: make-object (type)

Make a new object for a given named type.

Package

com.gigamonkeys.json.parser.

Source

json-builder.lisp.

Methods
Method: make-object ((type (eql :hash-table)))
Method: make-object ((type (eql :vector)))
Generic Function: save-key-value (key-value-pair object)

Save the key and value in the data structure returned by MAKE-OBJECT.

Package

com.gigamonkeys.json.parser.

Source

json-builder.lisp.

Methods
Method: save-key-value (key-value-pair (object hash-table))
Method: save-key-value (key-value-pair (object vector))

4.2.5 Types

Type: digit ()
Package

com.gigamonkeys.json.parser.

Source

json-builder.lisp.

Type: digit1-9 ()
Package

com.gigamonkeys.json.parser.

Source

json-builder.lisp.

Type: hex ()
Package

com.gigamonkeys.json.parser.

Source

json-builder.lisp.

Type: string-char ()
Package

com.gigamonkeys.json.parser.

Source

json-builder.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   E   F   G   J   M   P   S   T   W  
Index Entry  Section

E
emit-json: Private generic functions
emit-json: Private generic functions
emit-json: Private generic functions
emit-json: Private generic functions
emit-json: Private generic functions
emit-json: Private generic functions
emit-json: Private generic functions
emit-json: Private generic functions
emit-json: Private generic functions
emit-json-char: Private ordinary functions

F
finish-object: Private generic functions
finish-object: Private generic functions
finish-object: Private generic functions
fix-empty-object: Private ordinary functions
Function, emit-json-char: Private ordinary functions
Function, fix-empty-object: Private ordinary functions
Function, json: Public ordinary functions
Function, json-parser: Private ordinary functions
Function, parse-json: Public ordinary functions
Function, write-json: Public ordinary functions

G
Generic Function, emit-json: Private generic functions
Generic Function, finish-object: Private generic functions
Generic Function, json-stringify: Public generic functions
Generic Function, make-object: Private generic functions
Generic Function, save-key-value: Private generic functions
Generic Function, to-json: Public generic functions

J
json: Public ordinary functions
json-parser: Private ordinary functions
json-stringify: Public generic functions
json-stringify: Public generic functions
json-stringify: Public generic functions
json-stringify: Public generic functions
json-stringify: Public generic functions

M
Macro, tjp: Private macros
make-object: Private generic functions
make-object: Private generic functions
make-object: Private generic functions
Method, emit-json: Private generic functions
Method, emit-json: Private generic functions
Method, emit-json: Private generic functions
Method, emit-json: Private generic functions
Method, emit-json: Private generic functions
Method, emit-json: Private generic functions
Method, emit-json: Private generic functions
Method, emit-json: Private generic functions
Method, finish-object: Private generic functions
Method, finish-object: Private generic functions
Method, json-stringify: Public generic functions
Method, json-stringify: Public generic functions
Method, json-stringify: Public generic functions
Method, json-stringify: Public generic functions
Method, make-object: Private generic functions
Method, make-object: Private generic functions
Method, save-key-value: Private generic functions
Method, save-key-value: Private generic functions
Method, to-json: Public generic functions
Method, to-json: Public generic functions

P
parse-json: Public ordinary functions

S
save-key-value: Private generic functions
save-key-value: Private generic functions
save-key-value: Private generic functions

T
tjp: Private macros
to-json: Public generic functions
to-json: Public generic functions
to-json: Public generic functions

W
write-json: Public ordinary functions