The cl-json-schema Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-json-schema Reference Manual

This is the cl-json-schema Reference Manual, version 0.0.1, generated automatically by Declt version 3.0 "Montgomery Scott" on Mon Apr 19 14:56:26 2021 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

cl-json-schema

Mark Skilbeck markskilbeck@gmail.com

A Common-Lisp library to validate your JSON schema.

Documentation

The main entrypoint is (cl-json-schema:validate thing schema) where thing is a JSON-compatible value, and schema is a hash-table. (Alternatively, if you prefer, (json-schema:validate thing schema).

For example

(let ((schema (yason:parse "{
  \"type\": \"object\",
  \"propertyNames\": {
    \"pattern\": \"^[A-Za-z_][A-Za-z0-9_]*$\"
  }
}
")))
  ;; NEAT!
  (json-schema:validate (yason:parse "{\"_a_proper_token_001\": \"value\"}")
                        schema)
  ;; NO BUENO! Key does not match the required pattern
  (json-schema:validate (yason:parse "{\"001 invalid\": \"value\"}")
                        schema))

License

MIT. See LICENSE.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

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


Previous: , Up: Systems   [Contents][Index]

2.1 cl-json-schema

Author

Your Name <your.name@example.com>

License

Specify license here

Description

Describe cl-json-schema here

Version

0.0.1

Dependencies
Source

cl-json-schema.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

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


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 cl-json-schema.asd

Location

cl-json-schema.asd

Systems

cl-json-schema (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 cl-json-schema/package.lisp

Parent

cl-json-schema (system)

Location

package.lisp

Packages

cl-json-schema


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 cl-json-schema/errors.lisp

Dependency

package.lisp (file)

Parent

cl-json-schema (system)

Location

errors.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

3.1.4 cl-json-schema/cl-json-schema.lisp

Dependency

errors.lisp (file)

Parent

cl-json-schema (system)

Location

cl-json-schema.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 cl-json-schema

Source

package.lisp (file)

Nickname

json-schema

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

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


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: json-schema-error MESSAGE &rest REST
Package

cl-json-schema

Source

errors.lisp (file)

Function: validate THING SCHEMA
Package

cl-json-schema

Source

cl-json-schema.lisp (file)

Function: validate-boolean BOOLEAN SCHEMA
Package

cl-json-schema

Source

cl-json-schema.lisp (file)

Function: validate-integer INTEGER SCHEMA
Package

cl-json-schema

Source

cl-json-schema.lisp (file)

Function: validate-number NUMBER SCHEMA
Package

cl-json-schema

Source

cl-json-schema.lisp (file)

Function: validate-object OBJECT SCHEMA
Package

cl-json-schema

Source

cl-json-schema.lisp (file)

Function: validate-string STRING SCHEMA
Package

cl-json-schema

Source

cl-json-schema.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Generic functions

Generic Function: json-schema-error-datum CONDITION
Package

cl-json-schema

Methods
Method: json-schema-error-datum (CONDITION json-schema-error)
Source

errors.lisp (file)

Generic Function: json-schema-error-exclusive-maximum CONDITION
Package

cl-json-schema

Methods
Method: json-schema-error-exclusive-maximum (CONDITION json-schema-range-error)
Source

errors.lisp (file)

Generic Function: json-schema-error-exclusive-minimum CONDITION
Package

cl-json-schema

Methods
Method: json-schema-error-exclusive-minimum (CONDITION json-schema-range-error)
Source

errors.lisp (file)

Generic Function: json-schema-error-expected-type CONDITION
Package

cl-json-schema

Methods
Method: json-schema-error-expected-type (CONDITION json-schema-invalid-type-error)
Source

errors.lisp (file)

Generic Function: json-schema-error-invalid-type CONDITION
Package

cl-json-schema

Methods
Method: json-schema-error-invalid-type (CONDITION json-schema-invalid-type-error)
Source

errors.lisp (file)

Generic Function: json-schema-error-max-length CONDITION
Package

cl-json-schema

Methods
Method: json-schema-error-max-length (CONDITION json-schema-length-error)
Source

errors.lisp (file)

Generic Function: json-schema-error-maximum CONDITION
Package

cl-json-schema

Methods
Method: json-schema-error-maximum (CONDITION json-schema-range-error)
Source

errors.lisp (file)

Generic Function: json-schema-error-maximum-properties CONDITION
Package

cl-json-schema

Methods
Method: json-schema-error-maximum-properties (CONDITION json-schema-properties-size-error)
Source

errors.lisp (file)

Generic Function: json-schema-error-min-length CONDITION
Package

cl-json-schema

Methods
Method: json-schema-error-min-length (CONDITION json-schema-length-error)
Source

errors.lisp (file)

Generic Function: json-schema-error-minimum CONDITION
Package

cl-json-schema

Methods
Method: json-schema-error-minimum (CONDITION json-schema-range-error)
Source

errors.lisp (file)

Generic Function: json-schema-error-minimum-properties CONDITION
Package

cl-json-schema

Methods
Method: json-schema-error-minimum-properties (CONDITION json-schema-properties-size-error)
Source

errors.lisp (file)

Generic Function: json-schema-error-multiple CONDITION
Package

cl-json-schema

Methods
Method: json-schema-error-multiple (CONDITION json-schema-multipleof-error)
Source

errors.lisp (file)

Generic Function: json-schema-error-pattern CONDITION
Package

cl-json-schema

Methods
Method: json-schema-error-pattern (CONDITION json-schema-pattern-error)
Source

errors.lisp (file)

Generic Function: json-schema-error-property-name CONDITION
Package

cl-json-schema

Methods
Method: json-schema-error-property-name (CONDITION json-schema-additional-property-error)
Source

errors.lisp (file)

Method: json-schema-error-property-name (CONDITION json-schema-required-property-error)
Source

errors.lisp (file)

Generic Function: json-schema-error-provided-properties CONDITION
Package

cl-json-schema

Methods
Method: json-schema-error-provided-properties (CONDITION json-schema-properties-size-error)
Source

errors.lisp (file)

Generic Function: json-schema-error-schema CONDITION
Package

cl-json-schema

Methods
Method: json-schema-error-schema (CONDITION json-schema-error)
Source

errors.lisp (file)

Generic Function: json-schema-error-schema-type CONDITION
Package

cl-json-schema

Methods
Method: json-schema-error-schema-type (CONDITION json-schema-invalid-schema-type-error)
Source

errors.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Conditions

Condition: json-schema-additional-property-error ()
Package

cl-json-schema

Source

errors.lisp (file)

Direct superclasses

json-schema-error (condition)

Direct methods

json-schema-error-property-name (method)

Direct slots
Slot: property-name
Initargs

:property-name

Readers

json-schema-error-property-name (generic function)

Condition: json-schema-error ()
Package

cl-json-schema

Source

errors.lisp (file)

Direct superclasses

condition (condition)

Direct subclasses
Direct methods
Direct slots
Slot: schema
Initargs

:schema

Initform

(quote nil)

Readers

json-schema-error-schema (generic function)

Slot: datum
Initargs

:datum

Initform

(quote nil)

Readers

json-schema-error-datum (generic function)

Slot: message
Initargs

:message

Initform

(quote nil)

Readers

json-schema-error-message (generic function)

Condition: json-schema-invalid-schema-type-error ()
Package

cl-json-schema

Source

errors.lisp (file)

Direct superclasses

json-schema-error (condition)

Direct methods

json-schema-error-schema-type (method)

Direct slots
Slot: schema-type
Initargs

:schema-type

Readers

json-schema-error-schema-type (generic function)

Condition: json-schema-invalid-type-error ()
Package

cl-json-schema

Source

errors.lisp (file)

Direct superclasses

json-schema-error (condition)

Direct methods
Direct slots
Slot: expected-type
Initargs

:expected-type

Readers

json-schema-error-expected-type (generic function)

Slot: invalid-type
Initargs

:invalid-type

Readers

json-schema-error-invalid-type (generic function)

Condition: json-schema-length-error ()
Package

cl-json-schema

Source

errors.lisp (file)

Direct superclasses

json-schema-error (condition)

Direct methods
Direct slots
Slot: min-length
Initargs

:min-length

Readers

json-schema-error-min-length (generic function)

Slot: max-length
Initargs

:max-length

Readers

json-schema-error-max-length (generic function)

Condition: json-schema-multipleof-error ()
Package

cl-json-schema

Source

errors.lisp (file)

Direct superclasses

json-schema-error (condition)

Direct methods

json-schema-error-multiple (method)

Direct slots
Slot: multiple
Initargs

:multiple

Readers

json-schema-error-multiple (generic function)

Condition: json-schema-pattern-error ()
Package

cl-json-schema

Source

errors.lisp (file)

Direct superclasses

json-schema-error (condition)

Direct methods

json-schema-error-pattern (method)

Direct slots
Slot: pattern
Initargs

:pattern

Readers

json-schema-error-pattern (generic function)

Condition: json-schema-properties-size-error ()
Package

cl-json-schema

Source

errors.lisp (file)

Direct superclasses

json-schema-error (condition)

Direct methods
Direct slots
Slot: minimum-properties
Initargs

:minimum-properties

Readers

json-schema-error-minimum-properties (generic function)

Slot: maximum-properties
Initargs

:maximum-properties

Readers

json-schema-error-maximum-properties (generic function)

Slot: provided-properties
Initargs

:provided-properties

Readers

json-schema-error-provided-properties (generic function)

Condition: json-schema-range-error ()
Package

cl-json-schema

Source

errors.lisp (file)

Direct superclasses

json-schema-error (condition)

Direct methods
Direct slots
Slot: minimum
Initargs

:minimum

Readers

json-schema-error-minimum (generic function)

Slot: exclusive-minimum
Initargs

:exclusive-minimum

Readers

json-schema-error-exclusive-minimum (generic function)

Slot: maximum
Initargs

:maximum

Readers

json-schema-error-maximum (generic function)

Slot: exclusive-maximum
Initargs

:exclusive-maximum

Readers

json-schema-error-exclusive-maximum (generic function)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: *schema-reserved-keywords*
Package

cl-json-schema

Source

cl-json-schema.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Functions

Function: lisp->json THING
Package

cl-json-schema

Source

cl-json-schema.lisp (file)

Function: matching-key VALUE REGEX-KEYED-TABLE
Package

cl-json-schema

Source

cl-json-schema.lisp (file)

Function: validate-array ARRAY SCHEMA
Package

cl-json-schema

Source

cl-json-schema.lisp (file)

Function: validate-number-properties NUMBER SCHEMA
Package

cl-json-schema

Source

cl-json-schema.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Generic functions

Generic Function: json-schema-error-message CONDITION
Package

cl-json-schema

Methods
Method: json-schema-error-message (CONDITION json-schema-error)
Source

errors.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.4 Conditions

Condition: json-schema-required-property-error ()
Package

cl-json-schema

Source

errors.lisp (file)

Direct superclasses

json-schema-error (condition)

Direct subclasses

json-schema-required-property-missing-error (condition)

Direct methods

json-schema-error-property-name (method)

Direct slots
Slot: property-name
Initargs

:property-name

Readers

json-schema-error-property-name (generic function)

Condition: json-schema-required-property-missing-error ()
Package

cl-json-schema

Source

errors.lisp (file)

Direct superclasses

json-schema-required-property-error (condition)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.5 Types

Type: json-type ()
Package

cl-json-schema

Source

cl-json-schema.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L  
Index Entry  Section

C
cl-json-schema.asd: The cl-json-schema․asd file
cl-json-schema/cl-json-schema.lisp: The cl-json-schema/cl-json-schema․lisp file
cl-json-schema/errors.lisp: The cl-json-schema/errors․lisp file
cl-json-schema/package.lisp: The cl-json-schema/package․lisp file

F
File, Lisp, cl-json-schema.asd: The cl-json-schema․asd file
File, Lisp, cl-json-schema/cl-json-schema.lisp: The cl-json-schema/cl-json-schema․lisp file
File, Lisp, cl-json-schema/errors.lisp: The cl-json-schema/errors․lisp file
File, Lisp, cl-json-schema/package.lisp: The cl-json-schema/package․lisp file

L
Lisp File, cl-json-schema.asd: The cl-json-schema․asd file
Lisp File, cl-json-schema/cl-json-schema.lisp: The cl-json-schema/cl-json-schema․lisp file
Lisp File, cl-json-schema/errors.lisp: The cl-json-schema/errors․lisp file
Lisp File, cl-json-schema/package.lisp: The cl-json-schema/package․lisp file

Jump to:   C   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   F   G   J   L   M   V  
Index Entry  Section

F
Function, json-schema-error: Exported functions
Function, lisp->json: Internal functions
Function, matching-key: Internal functions
Function, validate: Exported functions
Function, validate-array: Internal functions
Function, validate-boolean: Exported functions
Function, validate-integer: Exported functions
Function, validate-number: Exported functions
Function, validate-number-properties: Internal functions
Function, validate-object: Exported functions
Function, validate-string: Exported functions

G
Generic Function, json-schema-error-datum: Exported generic functions
Generic Function, json-schema-error-exclusive-maximum: Exported generic functions
Generic Function, json-schema-error-exclusive-minimum: Exported generic functions
Generic Function, json-schema-error-expected-type: Exported generic functions
Generic Function, json-schema-error-invalid-type: Exported generic functions
Generic Function, json-schema-error-max-length: Exported generic functions
Generic Function, json-schema-error-maximum: Exported generic functions
Generic Function, json-schema-error-maximum-properties: Exported generic functions
Generic Function, json-schema-error-message: Internal generic functions
Generic Function, json-schema-error-min-length: Exported generic functions
Generic Function, json-schema-error-minimum: Exported generic functions
Generic Function, json-schema-error-minimum-properties: Exported generic functions
Generic Function, json-schema-error-multiple: Exported generic functions
Generic Function, json-schema-error-pattern: Exported generic functions
Generic Function, json-schema-error-property-name: Exported generic functions
Generic Function, json-schema-error-provided-properties: Exported generic functions
Generic Function, json-schema-error-schema: Exported generic functions
Generic Function, json-schema-error-schema-type: Exported generic functions

J
json-schema-error: Exported functions
json-schema-error-datum: Exported generic functions
json-schema-error-datum: Exported generic functions
json-schema-error-exclusive-maximum: Exported generic functions
json-schema-error-exclusive-maximum: Exported generic functions
json-schema-error-exclusive-minimum: Exported generic functions
json-schema-error-exclusive-minimum: Exported generic functions
json-schema-error-expected-type: Exported generic functions
json-schema-error-expected-type: Exported generic functions
json-schema-error-invalid-type: Exported generic functions
json-schema-error-invalid-type: Exported generic functions
json-schema-error-max-length: Exported generic functions
json-schema-error-max-length: Exported generic functions
json-schema-error-maximum: Exported generic functions
json-schema-error-maximum: Exported generic functions
json-schema-error-maximum-properties: Exported generic functions
json-schema-error-maximum-properties: Exported generic functions
json-schema-error-message: Internal generic functions
json-schema-error-message: Internal generic functions
json-schema-error-min-length: Exported generic functions
json-schema-error-min-length: Exported generic functions
json-schema-error-minimum: Exported generic functions
json-schema-error-minimum: Exported generic functions
json-schema-error-minimum-properties: Exported generic functions
json-schema-error-minimum-properties: Exported generic functions
json-schema-error-multiple: Exported generic functions
json-schema-error-multiple: Exported generic functions
json-schema-error-pattern: Exported generic functions
json-schema-error-pattern: Exported generic functions
json-schema-error-property-name: Exported generic functions
json-schema-error-property-name: Exported generic functions
json-schema-error-property-name: Exported generic functions
json-schema-error-provided-properties: Exported generic functions
json-schema-error-provided-properties: Exported generic functions
json-schema-error-schema: Exported generic functions
json-schema-error-schema: Exported generic functions
json-schema-error-schema-type: Exported generic functions
json-schema-error-schema-type: Exported generic functions

L
lisp->json: Internal functions

M
matching-key: Internal functions
Method, json-schema-error-datum: Exported generic functions
Method, json-schema-error-exclusive-maximum: Exported generic functions
Method, json-schema-error-exclusive-minimum: Exported generic functions
Method, json-schema-error-expected-type: Exported generic functions
Method, json-schema-error-invalid-type: Exported generic functions
Method, json-schema-error-max-length: Exported generic functions
Method, json-schema-error-maximum: Exported generic functions
Method, json-schema-error-maximum-properties: Exported generic functions
Method, json-schema-error-message: Internal generic functions
Method, json-schema-error-min-length: Exported generic functions
Method, json-schema-error-minimum: Exported generic functions
Method, json-schema-error-minimum-properties: Exported generic functions
Method, json-schema-error-multiple: Exported generic functions
Method, json-schema-error-pattern: Exported generic functions
Method, json-schema-error-property-name: Exported generic functions
Method, json-schema-error-property-name: Exported generic functions
Method, json-schema-error-provided-properties: Exported generic functions
Method, json-schema-error-schema: Exported generic functions
Method, json-schema-error-schema-type: Exported generic functions

V
validate: Exported functions
validate-array: Internal functions
validate-boolean: Exported functions
validate-integer: Exported functions
validate-number: Exported functions
validate-number-properties: Internal functions
validate-object: Exported functions
validate-string: Exported functions

Jump to:   F   G   J   L   M   V  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
D   E   I   M   P   S  
Index Entry  Section

*
*schema-reserved-keywords*: Internal special variables

D
datum: Exported conditions

E
exclusive-maximum: Exported conditions
exclusive-minimum: Exported conditions
expected-type: Exported conditions

I
invalid-type: Exported conditions

M
max-length: Exported conditions
maximum: Exported conditions
maximum-properties: Exported conditions
message: Exported conditions
min-length: Exported conditions
minimum: Exported conditions
minimum-properties: Exported conditions
multiple: Exported conditions

P
pattern: Exported conditions
property-name: Exported conditions
property-name: Internal conditions
provided-properties: Exported conditions

S
schema: Exported conditions
schema-type: Exported conditions
Slot, datum: Exported conditions
Slot, exclusive-maximum: Exported conditions
Slot, exclusive-minimum: Exported conditions
Slot, expected-type: Exported conditions
Slot, invalid-type: Exported conditions
Slot, max-length: Exported conditions
Slot, maximum: Exported conditions
Slot, maximum-properties: Exported conditions
Slot, message: Exported conditions
Slot, min-length: Exported conditions
Slot, minimum: Exported conditions
Slot, minimum-properties: Exported conditions
Slot, multiple: Exported conditions
Slot, pattern: Exported conditions
Slot, property-name: Exported conditions
Slot, property-name: Internal conditions
Slot, provided-properties: Exported conditions
Slot, schema: Exported conditions
Slot, schema-type: Exported conditions
Special Variable, *schema-reserved-keywords*: Internal special variables

Jump to:   *  
D   E   I   M   P   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   J   P   S   T  
Index Entry  Section

C
cl-json-schema: The cl-json-schema system
cl-json-schema: The cl-json-schema package
Condition, json-schema-additional-property-error: Exported conditions
Condition, json-schema-error: Exported conditions
Condition, json-schema-invalid-schema-type-error: Exported conditions
Condition, json-schema-invalid-type-error: Exported conditions
Condition, json-schema-length-error: Exported conditions
Condition, json-schema-multipleof-error: Exported conditions
Condition, json-schema-pattern-error: Exported conditions
Condition, json-schema-properties-size-error: Exported conditions
Condition, json-schema-range-error: Exported conditions
Condition, json-schema-required-property-error: Internal conditions
Condition, json-schema-required-property-missing-error: Internal conditions

J
json-schema-additional-property-error: Exported conditions
json-schema-error: Exported conditions
json-schema-invalid-schema-type-error: Exported conditions
json-schema-invalid-type-error: Exported conditions
json-schema-length-error: Exported conditions
json-schema-multipleof-error: Exported conditions
json-schema-pattern-error: Exported conditions
json-schema-properties-size-error: Exported conditions
json-schema-range-error: Exported conditions
json-schema-required-property-error: Internal conditions
json-schema-required-property-missing-error: Internal conditions
json-type: Internal types

P
Package, cl-json-schema: The cl-json-schema package

S
System, cl-json-schema: The cl-json-schema system

T
Type, json-type: Internal types

Jump to:   C   J   P   S   T