The trivial-json-codec Reference Manual

This is the trivial-json-codec Reference Manual, version 0.3.12, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:56:19 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 trivial-json-codec

A JSON parser able to identify class hierarchies.

Author

Eric Diethelm <>

License

MIT

Long Description
Version

0.3.12

Dependencies
  • trivial-utilities (system).
  • log4cl (system).
  • closer-mop (system).
  • iterate (system).
  • parse-number (system).
Source

trivial-json-codec.asd.

Child Components

3 Files

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


3.1 Lisp


3.1.1 trivial-json-codec/trivial-json-codec.asd

Source

trivial-json-codec.asd.

Parent Component

trivial-json-codec (system).

ASDF Systems

trivial-json-codec.


3.1.2 trivial-json-codec/package.lisp

Source

trivial-json-codec.asd.

Parent Component

trivial-json-codec (system).

Packages

trivial-json-codec.


3.1.3 trivial-json-codec/trivial-json-codec.lisp

Source

trivial-json-codec.asd.

Parent Component

trivial-json-codec (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 trivial-json-codec

trivial-json-codec provides a JSON parser able to identify class hierarchies.

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

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


5.1 Public Interface


5.1.1 Special variables

Special Variable: *slots-to-ignore-in-serialization*
Package

trivial-json-codec.

Source

trivial-json-codec.lisp.


5.1.2 Ordinary functions

Function: deserialize-json (json-str &key class read-table constructors)

Reads *JSON-STR* and creates an according object.
If *CLASS* is non-nil and represents a class, an instance of it is returned. Otherwise only built-in types can be deserialized.
*READ-TABLE* makes it possible to inject specific readers, as pondons to *SERIALIZE*. It has the form of an alist containing the dispatch character as car and the deserialization function as cdr. *CONSTRUCTORS* holds an alist mapping the keyword returned by a specific reader to a object construction function.

Package

trivial-json-codec.

Source

trivial-json-codec.lisp.

Function: deserialize-raw (json-str &key read-table)

Deserialize *JSON-STR* into a property list. As opposed to *DESERIALIZE-JSON* this function does not require a base class to deserialize.

Package

trivial-json-codec.

Source

trivial-json-codec.lisp.

Function: read-array (json start-position &key open-char close-char)
Package

trivial-json-codec.

Source

trivial-json-codec.lisp.

Function: read-number (json start-position)
Package

trivial-json-codec.

Source

trivial-json-codec.lisp.

Function: read-string (json start-position)
Package

trivial-json-codec.

Source

trivial-json-codec.lisp.

Function: serialize-json (obj)

Takes *OBJ* and serializes it into a string. Uses the generic *SERIALIZE* to do the job.

Package

trivial-json-codec.

Source

trivial-json-codec.lisp.


5.1.3 Generic functions

Generic Function: serialize (obj stream)

Serialize an object *OBJ* into *STREAM*.
Implementations for built-in types already exist. The user might extend with methods for specific types.

Package

trivial-json-codec.

Source

trivial-json-codec.lisp.

Methods
Method: serialize ((obj standard-object) stream)
Method: serialize ((obj symbol) stream)
Method: serialize ((obj array) stream)
Method: serialize ((obj list) stream)
Method: serialize ((obj float) stream)
Method: serialize ((obj integer) stream)
Method: serialize ((obj string) stream)
Method: serialize ((obj (eql t)) stream)
Method: serialize ((obj function) stream)
Method: serialize ((obj (eql nil)) stream)

5.2 Internals


5.2.1 Ordinary functions

Function: consume (json json-start-position read-table)

Consumes one element from the beginning of the string and returns the values (produced-element consumed-until).

Package

trivial-json-codec.

Source

trivial-json-codec.lisp.

Function: create-object-from-json (parsed base-class constructors)
Package

trivial-json-codec.

Source

trivial-json-codec.lisp.

Function: create-symbol-from-json (parsed base-class constructors)
Package

trivial-json-codec.

Source

trivial-json-codec.lisp.

Function: parse-array (json start-position open-char read-table)
Package

trivial-json-codec.

Source

trivial-json-codec.lisp.

Function: parse-keyvalue (json start-position json-end-position read-table)
Package

trivial-json-codec.

Source

trivial-json-codec.lisp.

Function: parse-object (json start-position read-table)
Package

trivial-json-codec.

Source

trivial-json-codec.lisp.

Function: read-false (json start-position)
Package

trivial-json-codec.

Source

trivial-json-codec.lisp.

Function: read-null (json start-position)
Package

trivial-json-codec.

Source

trivial-json-codec.lisp.

Function: read-true (json start-position)
Package

trivial-json-codec.

Source

trivial-json-codec.lisp.

Function: skip-blanks (str start end)
Package

trivial-json-codec.

Source

trivial-json-codec.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   C   D   F   G   M   P   R   S  
Index Entry  Section

C
consume: Private ordinary functions
create-object-from-json: Private ordinary functions
create-symbol-from-json: Private ordinary functions

D
deserialize-json: Public ordinary functions
deserialize-raw: Public ordinary functions

F
Function, consume: Private ordinary functions
Function, create-object-from-json: Private ordinary functions
Function, create-symbol-from-json: Private ordinary functions
Function, deserialize-json: Public ordinary functions
Function, deserialize-raw: Public ordinary functions
Function, parse-array: Private ordinary functions
Function, parse-keyvalue: Private ordinary functions
Function, parse-object: Private ordinary functions
Function, read-array: Public ordinary functions
Function, read-false: Private ordinary functions
Function, read-null: Private ordinary functions
Function, read-number: Public ordinary functions
Function, read-string: Public ordinary functions
Function, read-true: Private ordinary functions
Function, serialize-json: Public ordinary functions
Function, skip-blanks: Private ordinary functions

G
Generic Function, serialize: Public generic functions

M
Method, serialize: Public generic functions
Method, serialize: Public generic functions
Method, serialize: Public generic functions
Method, serialize: Public generic functions
Method, serialize: Public generic functions
Method, serialize: Public generic functions
Method, serialize: Public generic functions
Method, serialize: Public generic functions
Method, serialize: Public generic functions
Method, serialize: Public generic functions

P
parse-array: Private ordinary functions
parse-keyvalue: Private ordinary functions
parse-object: Private ordinary functions

R
read-array: Public ordinary functions
read-false: Private ordinary functions
read-null: Private ordinary functions
read-number: Public ordinary functions
read-string: Public ordinary functions
read-true: Private ordinary functions

S
serialize: Public generic functions
serialize: Public generic functions
serialize: Public generic functions
serialize: Public generic functions
serialize: Public generic functions
serialize: Public generic functions
serialize: Public generic functions
serialize: Public generic functions
serialize: Public generic functions
serialize: Public generic functions
serialize: Public generic functions
serialize-json: Public ordinary functions
skip-blanks: Private ordinary functions


A.3 Variables