The json-streams Reference Manual

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

Table of Contents


1 Introduction


2 Systems

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


2.1 json-streams

A stream based JSON parser/writer, well suited for higher as building block for higher level libraries.

Author

Thomas Bakketun <>

License

GNU General Public Licence 3.0

Source

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

Source

json-streams.asd.

Parent Component

json-streams (system).

ASDF Systems

json-streams.


3.1.2 json-streams/package.lisp

Source

json-streams.asd.

Parent Component

json-streams (system).

Packages

json-streams.


3.1.3 json-streams/write-float.lisp

Dependency

package.lisp (file).

Source

json-streams.asd.

Parent Component

json-streams (system).

Internals

3.1.4 json-streams/base.lisp

Dependency

write-float.lisp (file).

Source

json-streams.asd.

Parent Component

json-streams (system).

Public Interface
Internals

3.1.5 json-streams/output-stream.lisp

Dependency

base.lisp (file).

Source

json-streams.asd.

Parent Component

json-streams (system).

Public Interface
Internals

3.1.6 json-streams/input-stream.lisp

Dependency

output-stream.lisp (file).

Source

json-streams.asd.

Parent Component

json-streams (system).

Public Interface
Internals

3.1.7 json-streams/parse.lisp

Dependency

input-stream.lisp (file).

Source

json-streams.asd.

Parent Component

json-streams (system).

Public Interface
Internals

parse-single (function).


3.1.8 json-streams/output.lisp

Dependency

parse.lisp (file).

Source

json-streams.asd.

Parent Component

json-streams (system).

Public Interface

3.1.9 json-streams/stringify.lisp

Dependency

output.lisp (file).

Source

json-streams.asd.

Parent Component

json-streams (system).

Public Interface
Internals

json-stringify-single (function).


4 Packages

Packages are listed by definition order.


4.1 json-streams

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 Macros

Macro: with-json-array (&body body)
Package

json-streams.

Source

output.lisp.

Macro: with-json-member (key &body body)
Package

json-streams.

Source

output.lisp.

Macro: with-json-object (&body body)
Package

json-streams.

Source

output.lisp.

Macro: with-json-output ((&optional target &rest options) &body body)
Package

json-streams.

Source

output.lisp.

Macro: with-open-json-stream ((var stream) &body body)
Package

json-streams.

Source

base.lisp.


5.1.2 Ordinary functions

Function: call-with-json-output (target options function)
Package

json-streams.

Source

output.lisp.

Function: json-close (json-stream &key abort)
Package

json-streams.

Source

base.lisp.

Function: json-output-alist (alist)
Package

json-streams.

Source

output.lisp.

Function: json-output-boolean (value)
Package

json-streams.

Source

output.lisp.

Function: json-output-member (key value)
Package

json-streams.

Source

output.lisp.

Function: json-output-null ()
Package

json-streams.

Source

output.lisp.

Function: json-output-plist (plist)
Package

json-streams.

Source

output.lisp.

Function: json-output-value (value)
Package

json-streams.

Source

output.lisp.

Function: json-parse (source &rest options)
Package

json-streams.

Source

parse.lisp.

Function: json-parse-multiple (source &rest options)
Package

json-streams.

Source

parse.lisp.

Function: json-read (json-input-stream)
Package

json-streams.

Source

input-stream.lisp.

Function: json-stringify (value &optional target &rest options)
Package

json-streams.

Source

stringify.lisp.

Function: json-stringify-multiple (value &optional target &rest options)
Package

json-streams.

Source

stringify.lisp.

Function: json-write (token *json-stream*)
Package

json-streams.

Source

output-stream.lisp.

Function: make-json-input-stream (source &key start end close-stream multiple use-ratios max-exponent raw-strings duplicate-key-check)
Package

json-streams.

Source

input-stream.lisp.

Function: make-json-output-stream (stream &key close-stream multiple indent escape-non-ascii duplicate-key-check key-encoder)
Package

json-streams.

Source

output-stream.lisp.


5.1.3 Generic functions

Generic Reader: json-stream-position (object)
Package

json-streams.

Methods
Reader Method: json-stream-position ((json-input-stream json-input-stream))

automatically generated reader method

Source

base.lisp.

Target Slot

position.


5.1.4 Conditions

Condition: json-error
Package

json-streams.

Source

base.lisp.

Direct superclasses

error.

Direct subclasses
Direct methods
Direct slots
Slot: stream
Package

common-lisp.

Initform

(quote json-streams::*json-stream*)

Initargs

:stream

Readers

json-error-stream.

Writers

This slot is read-only.

Slot: message
Initargs

:message

Readers

json-error-message.

Writers

This slot is read-only.

Condition: json-parse-error
Package

json-streams.

Source

base.lisp.

Direct superclasses

json-error.

Condition: json-write-error
Package

json-streams.

Source

base.lisp.

Direct superclasses

json-error.


5.1.5 Classes

Class: json-input-stream
Package

json-streams.

Source

base.lisp.

Direct superclasses

json-stream.

Direct methods
Direct slots
Slot: multiple
Initargs

:multiple

Slot: use-ratios
Initargs

:use-ratios

Slot: max-exponent
Initargs

:max-exponent

Slot: raw-strings
Initargs

:raw-strings

Slot: current-char
Slot: position
Package

common-lisp.

Initargs

:position

Readers

json-stream-position.

Writers

This slot is read-only.

Slot: newlines
Initform

(quote nil)

Slot: string-mode
Class: json-output-stream
Package

json-streams.

Source

base.lisp.

Direct superclasses

json-stream.

Direct methods

%json-close.

Direct slots
Slot: multiple
Initargs

:multiple

Slot: escape-non-ascii
Initargs

:escape-non-ascii

Slot: indent
Initargs

:indent

Slot: level
Initform

0

Slot: key-encoder
Initargs

:key-encoder

Class: json-stream
Package

json-streams.

Source

base.lisp.

Direct subclasses
Direct slots
Slot: stream
Package

common-lisp.

Initargs

:stream

Slot: close-stream
Initargs

:close-stream

Slot: state-stack
Initform

(quote (:before-json-text))

Slot: duplicate-key-check
Initargs

:duplicate-key-check

Slot: key-check-stack

5.1.6 Types

Type: json-array ()
Package

json-streams.

Source

base.lisp.

Type: json-object ()
Package

json-streams.

Source

base.lisp.

Type: json-string ()
Package

json-streams.

Source

base.lisp.


5.2 Internals


5.2.1 Constants

Constant: +float-radix+
Package

json-streams.

Source

write-float.lisp.

Constant: +min-e+
Package

json-streams.

Source

write-float.lisp.

Constant: +most-negative-json-integer+
Package

json-streams.

Source

base.lisp.

Constant: +most-positive-json-integer+
Package

json-streams.

Source

base.lisp.

Constant: +output-base+
Package

json-streams.

Source

write-float.lisp.

Constant: +precision+
Package

json-streams.

Source

write-float.lisp.


5.2.2 Special variables

Special Variable: *json-stream*
Package

json-streams.

Source

base.lisp.


5.2.3 Macros

Macro: ecase* (keyform &body cases)
Package

json-streams.

Source

base.lisp.

Macro: state-stack ()
Package

json-streams.

Source

base.lisp.


5.2.4 Ordinary functions

Function: %json-error (message &rest args)
Package

json-streams.

Source

base.lisp.

Function: begin-object ()
Package

json-streams.

Source

base.lisp.

Function: check-key (key)
Package

json-streams.

Source

base.lisp.

Function: current-position ()
Package

json-streams.

Source

input-stream.lisp.

Function: end-object ()
Package

json-streams.

Source

base.lisp.

Function: expect-string (start string token)
Package

json-streams.

Source

input-stream.lisp.

Function: exptt (bb k)
Package

json-streams.

Source

write-float.lisp.

Function: fixup (r s m+ m- k bb low-ok-p high-ok-p)
Package

json-streams.

Source

write-float.lisp.

Function: flonum->digits (v f e min-e p b bb)
Package

json-streams.

Source

write-float.lisp.

Function: generate (r s m+ m- bb low-ok-p high-ok-p)
Package

json-streams.

Source

write-float.lisp.

Function: json-encode-key (key json-stream)
Package

json-streams.

Source

output-stream.lisp.

Function: json-stringify-single (value)
Package

json-streams.

Source

stringify.lisp.

Function: logb (bb x)
Package

json-streams.

Source

write-float.lisp.

Function: parse-raw-string (start)
Package

json-streams.

Source

input-stream.lisp.

Function: parse-single (jstream)
Package

json-streams.

Source

parse.lisp.

Function: parse-string (start)
Package

json-streams.

Source

input-stream.lisp.

Function: parse-string-to-string (start)
Package

json-streams.

Source

input-stream.lisp.

Function: peek-next-char ()
Package

json-streams.

Source

input-stream.lisp.

Function: pop-state ()
Package

json-streams.

Source

base.lisp.

Function: push-state (new-state)
Package

json-streams.

Source

base.lisp.

Function: read-4hexdig ()
Package

json-streams.

Source

input-stream.lisp.

Function: read-escaped (start)
Package

json-streams.

Source

input-stream.lisp.

Function: read-integer (&key fractional-p)
Package

json-streams.

Source

input-stream.lisp.

Function: read-next-char ()
Package

json-streams.

Source

input-stream.lisp.

Function: read-number (start)
Package

json-streams.

Source

input-stream.lisp.

Function: read-raw-token (&optional *json-stream*)
Package

json-streams.

Source

input-stream.lisp.

Function: read-string-chars ()
Package

json-streams.

Source

input-stream.lisp.

Function: read-token (&optional start *json-stream*)
Package

json-streams.

Source

input-stream.lisp.

Function: scale (r s m+ m- k bb low-ok-p high-ok-p v)
Package

json-streams.

Source

write-float.lisp.

Function: skip-space ()
Package

json-streams.

Source

input-stream.lisp.

Function: switch-state (new-state)
Package

json-streams.

Source

base.lisp.

Function: unread-current-char ()
Package

json-streams.

Source

input-stream.lisp.

Function: valid-unescaped-char-p (char)
Package

json-streams.

Source

input-stream.lisp.

Function: write-escaped-string (string)
Package

json-streams.

Source

output-stream.lisp.

Function: write-float (float stream)
Package

json-streams.

Source

write-float.lisp.

Function: write-indent ()
Package

json-streams.

Source

output-stream.lisp.

Function: write-number (number)
Package

json-streams.

Source

output-stream.lisp.

Function: write-unicode (stream code-point)
Package

json-streams.

Source

output-stream.lisp.


5.2.5 Generic functions

Generic Function: %json-close (json-stream)
Package

json-streams.

Source

base.lisp.

Methods
Method: %json-close ((*json-stream* json-input-stream))
Source

input-stream.lisp.

Method: %json-close ((*json-stream* json-output-stream))
Source

output-stream.lisp.

Generic Reader: json-error-message (condition)
Package

json-streams.

Methods
Reader Method: json-error-message ((condition json-error))
Source

base.lisp.

Target Slot

message.

Generic Reader: json-error-stream (condition)
Package

json-streams.

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

base.lisp.

Target Slot

stream.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %  
B   C   E   F   G   J   L   M   P   R   S   U   V   W  
Index Entry  Section

%
%json-close: Private generic functions
%json-close: Private generic functions
%json-close: Private generic functions
%json-error: Private ordinary functions

B
begin-object: Private ordinary functions

C
call-with-json-output: Public ordinary functions
check-key: Private ordinary functions
current-position: Private ordinary functions

E
ecase*: Private macros
end-object: Private ordinary functions
expect-string: Private ordinary functions
exptt: Private ordinary functions

F
fixup: Private ordinary functions
flonum->digits: Private ordinary functions
Function, %json-error: Private ordinary functions
Function, begin-object: Private ordinary functions
Function, call-with-json-output: Public ordinary functions
Function, check-key: Private ordinary functions
Function, current-position: Private ordinary functions
Function, end-object: Private ordinary functions
Function, expect-string: Private ordinary functions
Function, exptt: Private ordinary functions
Function, fixup: Private ordinary functions
Function, flonum->digits: Private ordinary functions
Function, generate: Private ordinary functions
Function, json-close: Public ordinary functions
Function, json-encode-key: Private ordinary functions
Function, json-output-alist: Public ordinary functions
Function, json-output-boolean: Public ordinary functions
Function, json-output-member: Public ordinary functions
Function, json-output-null: Public ordinary functions
Function, json-output-plist: Public ordinary functions
Function, json-output-value: Public ordinary functions
Function, json-parse: Public ordinary functions
Function, json-parse-multiple: Public ordinary functions
Function, json-read: Public ordinary functions
Function, json-stringify: Public ordinary functions
Function, json-stringify-multiple: Public ordinary functions
Function, json-stringify-single: Private ordinary functions
Function, json-write: Public ordinary functions
Function, logb: Private ordinary functions
Function, make-json-input-stream: Public ordinary functions
Function, make-json-output-stream: Public ordinary functions
Function, parse-raw-string: Private ordinary functions
Function, parse-single: Private ordinary functions
Function, parse-string: Private ordinary functions
Function, parse-string-to-string: Private ordinary functions
Function, peek-next-char: Private ordinary functions
Function, pop-state: Private ordinary functions
Function, push-state: Private ordinary functions
Function, read-4hexdig: Private ordinary functions
Function, read-escaped: Private ordinary functions
Function, read-integer: Private ordinary functions
Function, read-next-char: Private ordinary functions
Function, read-number: Private ordinary functions
Function, read-raw-token: Private ordinary functions
Function, read-string-chars: Private ordinary functions
Function, read-token: Private ordinary functions
Function, scale: Private ordinary functions
Function, skip-space: Private ordinary functions
Function, switch-state: Private ordinary functions
Function, unread-current-char: Private ordinary functions
Function, valid-unescaped-char-p: Private ordinary functions
Function, write-escaped-string: Private ordinary functions
Function, write-float: Private ordinary functions
Function, write-indent: Private ordinary functions
Function, write-number: Private ordinary functions
Function, write-unicode: Private ordinary functions

G
generate: Private ordinary functions
Generic Function, %json-close: Private generic functions
Generic Function, json-error-message: Private generic functions
Generic Function, json-error-stream: Private generic functions
Generic Function, json-stream-position: Public generic functions

J
json-close: Public ordinary functions
json-encode-key: Private ordinary functions
json-error-message: Private generic functions
json-error-message: Private generic functions
json-error-stream: Private generic functions
json-error-stream: Private generic functions
json-output-alist: Public ordinary functions
json-output-boolean: Public ordinary functions
json-output-member: Public ordinary functions
json-output-null: Public ordinary functions
json-output-plist: Public ordinary functions
json-output-value: Public ordinary functions
json-parse: Public ordinary functions
json-parse-multiple: Public ordinary functions
json-read: Public ordinary functions
json-stream-position: Public generic functions
json-stream-position: Public generic functions
json-stringify: Public ordinary functions
json-stringify-multiple: Public ordinary functions
json-stringify-single: Private ordinary functions
json-write: Public ordinary functions

L
logb: Private ordinary functions

M
Macro, ecase*: Private macros
Macro, state-stack: Private macros
Macro, with-json-array: Public macros
Macro, with-json-member: Public macros
Macro, with-json-object: Public macros
Macro, with-json-output: Public macros
Macro, with-open-json-stream: Public macros
make-json-input-stream: Public ordinary functions
make-json-output-stream: Public ordinary functions
Method, %json-close: Private generic functions
Method, %json-close: Private generic functions
Method, json-error-message: Private generic functions
Method, json-error-stream: Private generic functions
Method, json-stream-position: Public generic functions

P
parse-raw-string: Private ordinary functions
parse-single: Private ordinary functions
parse-string: Private ordinary functions
parse-string-to-string: Private ordinary functions
peek-next-char: Private ordinary functions
pop-state: Private ordinary functions
push-state: Private ordinary functions

R
read-4hexdig: Private ordinary functions
read-escaped: Private ordinary functions
read-integer: Private ordinary functions
read-next-char: Private ordinary functions
read-number: Private ordinary functions
read-raw-token: Private ordinary functions
read-string-chars: Private ordinary functions
read-token: Private ordinary functions

S
scale: Private ordinary functions
skip-space: Private ordinary functions
state-stack: Private macros
switch-state: Private ordinary functions

U
unread-current-char: Private ordinary functions

V
valid-unescaped-char-p: Private ordinary functions

W
with-json-array: Public macros
with-json-member: Public macros
with-json-object: Public macros
with-json-output: Public macros
with-open-json-stream: Public macros
write-escaped-string: Private ordinary functions
write-float: Private ordinary functions
write-indent: Private ordinary functions
write-number: Private ordinary functions
write-unicode: Private ordinary functions


A.3 Variables

Jump to:   *   +  
C   D   E   I   K   L   M   N   P   R   S   U  
Index Entry  Section

*
*json-stream*: Private special variables

+
+float-radix+: Private constants
+min-e+: Private constants
+most-negative-json-integer+: Private constants
+most-positive-json-integer+: Private constants
+output-base+: Private constants
+precision+: Private constants

C
close-stream: Public classes
Constant, +float-radix+: Private constants
Constant, +min-e+: Private constants
Constant, +most-negative-json-integer+: Private constants
Constant, +most-positive-json-integer+: Private constants
Constant, +output-base+: Private constants
Constant, +precision+: Private constants
current-char: Public classes

D
duplicate-key-check: Public classes

E
escape-non-ascii: Public classes

I
indent: Public classes

K
key-check-stack: Public classes
key-encoder: Public classes

L
level: Public classes

M
max-exponent: Public classes
message: Public conditions
multiple: Public classes
multiple: Public classes

N
newlines: Public classes

P
position: Public classes

R
raw-strings: Public classes

S
Slot, close-stream: Public classes
Slot, current-char: Public classes
Slot, duplicate-key-check: Public classes
Slot, escape-non-ascii: Public classes
Slot, indent: Public classes
Slot, key-check-stack: Public classes
Slot, key-encoder: Public classes
Slot, level: Public classes
Slot, max-exponent: Public classes
Slot, message: Public conditions
Slot, multiple: Public classes
Slot, multiple: Public classes
Slot, newlines: Public classes
Slot, position: Public classes
Slot, raw-strings: Public classes
Slot, state-stack: Public classes
Slot, stream: Public conditions
Slot, stream: Public classes
Slot, string-mode: Public classes
Slot, use-ratios: Public classes
Special Variable, *json-stream*: Private special variables
state-stack: Public classes
stream: Public conditions
stream: Public classes
string-mode: Public classes

U
use-ratios: Public classes


A.4 Data types

Jump to:   B   C   F   I   J   O   P   S   T   W  
Index Entry  Section

B
base.lisp: The json-streams/base․lisp file

C
Class, json-input-stream: Public classes
Class, json-output-stream: Public classes
Class, json-stream: Public classes
Condition, json-error: Public conditions
Condition, json-parse-error: Public conditions
Condition, json-write-error: Public conditions

F
File, base.lisp: The json-streams/base․lisp file
File, input-stream.lisp: The json-streams/input-stream․lisp file
File, json-streams.asd: The json-streams/json-streams․asd file
File, output-stream.lisp: The json-streams/output-stream․lisp file
File, output.lisp: The json-streams/output․lisp file
File, package.lisp: The json-streams/package․lisp file
File, parse.lisp: The json-streams/parse․lisp file
File, stringify.lisp: The json-streams/stringify․lisp file
File, write-float.lisp: The json-streams/write-float․lisp file

I
input-stream.lisp: The json-streams/input-stream․lisp file

J
json-array: Public types
json-error: Public conditions
json-input-stream: Public classes
json-object: Public types
json-output-stream: Public classes
json-parse-error: Public conditions
json-stream: Public classes
json-streams: The json-streams system
json-streams: The json-streams package
json-streams.asd: The json-streams/json-streams․asd file
json-string: Public types
json-write-error: Public conditions

O
output-stream.lisp: The json-streams/output-stream․lisp file
output.lisp: The json-streams/output․lisp file

P
Package, json-streams: The json-streams package
package.lisp: The json-streams/package․lisp file
parse.lisp: The json-streams/parse․lisp file

S
stringify.lisp: The json-streams/stringify․lisp file
System, json-streams: The json-streams system

T
Type, json-array: Public types
Type, json-object: Public types
Type, json-string: Public types

W
write-float.lisp: The json-streams/write-float․lisp file