The json-template Reference Manual

Table of Contents

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

The json-template Reference Manual

This is the json-template Reference Manual, version 0.1.0, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 11:11:48 2018 GMT+0.


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

1 Introduction

JSON Template for Common Lisp

Summary

An implementation of JSON Template in Common Lisp.

Implementation Features

Missing Things

Examples

JSON-TEMPLATE> (defparameter *tmpl* (parse-template-string "
<h1>{title|html}</h1>
{.section people}
<ul>
{.repeated section @}
  <li>{name} ({age} years)</li>
{.end}
</ul>
{.or}
<p>No one's registered.</p>
{.end}"))
*TMPL*
JSON-TEMPLATE> (expand-template *tmpl*
                                '(:title "<Registered People>"
                                  :people ((:name "Nathalie" :age 24)
                                           (:name "Heinrich" :age 28)
                                           (:name "Hans"     :age 25))))
"
<h1>&#60;Registered People&#62;</h1>
<ul>
  <li>Nathalie (24 years)</li>
  <li>Heinrich (28 years)</li>
  <li>Hans (25 years)</li>
</ul>
"
JSON-TEMPLATE> (expand-template *tmpl*
                                '(:title "<Registered People>"
                                  :people ()))
"
<h1>&#60;Registered People&#62;</h1>
<p>No one's registered.</p>
"

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 json-template

Author

Matthias Andreas Benkard

License

Apache License, version 2.0

Description

An implementation of a subset of the JSON Template language.

Version

0.1.0

Source

json-template.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 json-template.asd

Location

json-template.asd

Systems

json-template (system)


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

3.1.2 json-template/json-template.lisp

Parent

json-template (system)

Location

json-template.lisp

Packages

json-template

Exported Definitions
Internal Definitions

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

3.1.3 json-template/formatters.lisp

Dependency

json-template.lisp (file)

Parent

json-template (system)

Location

formatters.lisp

Exported Definitions

*template-formatters* (special variable)

Internal Definitions

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

4 Packages

Packages are listed by definition order.


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

4.1 json-template

Source

json-template.lisp (file)

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 Special variables

Special Variable: *template-formatters*
Package

json-template

Source

formatters.lisp (file)


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

5.1.2 Functions

Function: expand-template TEMPLATE CONTEXT
Package

json-template

Source

json-template.lisp (file)

Function: parse-template-string STRING
Package

json-template

Source

json-template.lisp (file)


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

5.2 Internal definitions


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

5.2.1 Constants

Constant: +not-found+
Package

json-template

Source

json-template.lisp (file)


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

5.2.2 Functions

Function: escape-for-uri STRING
Package

json-template

Source

formatters.lisp (file)

Function: expand-template-to-stream TEMPLATE CONTEXTS STREAM
Package

json-template

Source

json-template.lisp (file)

Function: expand-things-to-stream TEMPLATE CONTEXTS STREAM
Package

json-template

Source

json-template.lisp (file)

Function: getcontext CONTEXT KEY &aux RESULT
Package

json-template

Source

json-template.lisp (file)

Function: listify-key KEY &optional START
Package

json-template

Source

json-template.lisp (file)

Function: lookup-context CONTEXTS KEY
Package

json-template

Source

json-template.lisp (file)

Function: make-escaper REPLACEMENTS
Package

json-template

Source

formatters.lisp (file)

Function: parse-directive STRING
Package

json-template

Source

json-template.lisp (file)

Function: parse-raw-tokens TOKENS
Package

json-template

Source

json-template.lisp (file)

Function: parse-token TOKEN
Package

json-template

Source

json-template.lisp (file)

Function: parse-tokens TOKENS
Package

json-template

Source

json-template.lisp (file)

Function: parse-variable STRING
Package

json-template

Source

json-template.lisp (file)

Function: tokenize-template-string STRING
Package

json-template

Source

json-template.lisp (file)


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

5.2.3 Generic functions

Generic Function: template-things OBJECT
Generic Function: (setf template-things) NEW-VALUE OBJECT
Package

json-template

Methods
Method: template-things (TEMPLATE template)

automatically generated reader method

Source

json-template.lisp (file)

Method: (setf template-things) NEW-VALUE (TEMPLATE template)

automatically generated writer method

Source

json-template.lisp (file)


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

5.2.4 Classes

Class: template ()
Package

json-template

Source

json-template.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: things
Initargs

:things

Readers

template-things (generic function)

Writers

(setf template-things) (generic function)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   J   L  
Index Entry  Section

F
File, Lisp, json-template.asd: The json-template<dot>asd file
File, Lisp, json-template/formatters.lisp: The json-template/formatters<dot>lisp file
File, Lisp, json-template/json-template.lisp: The json-template/json-template<dot>lisp file

J
json-template.asd: The json-template<dot>asd file
json-template/formatters.lisp: The json-template/formatters<dot>lisp file
json-template/json-template.lisp: The json-template/json-template<dot>lisp file

L
Lisp File, json-template.asd: The json-template<dot>asd file
Lisp File, json-template/formatters.lisp: The json-template/formatters<dot>lisp file
Lisp File, json-template/json-template.lisp: The json-template/json-template<dot>lisp file

Jump to:   F   J   L  

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

A.2 Functions

Jump to:   (  
E   F   G   L   M   P   T  
Index Entry  Section

(
(setf template-things): Internal generic functions
(setf template-things): Internal generic functions

E
escape-for-uri: Internal functions
expand-template: Exported functions
expand-template-to-stream: Internal functions
expand-things-to-stream: Internal functions

F
Function, escape-for-uri: Internal functions
Function, expand-template: Exported functions
Function, expand-template-to-stream: Internal functions
Function, expand-things-to-stream: Internal functions
Function, getcontext: Internal functions
Function, listify-key: Internal functions
Function, lookup-context: Internal functions
Function, make-escaper: Internal functions
Function, parse-directive: Internal functions
Function, parse-raw-tokens: Internal functions
Function, parse-template-string: Exported functions
Function, parse-token: Internal functions
Function, parse-tokens: Internal functions
Function, parse-variable: Internal functions
Function, tokenize-template-string: Internal functions

G
Generic Function, (setf template-things): Internal generic functions
Generic Function, template-things: Internal generic functions
getcontext: Internal functions

L
listify-key: Internal functions
lookup-context: Internal functions

M
make-escaper: Internal functions
Method, (setf template-things): Internal generic functions
Method, template-things: Internal generic functions

P
parse-directive: Internal functions
parse-raw-tokens: Internal functions
parse-template-string: Exported functions
parse-token: Internal functions
parse-tokens: Internal functions
parse-variable: Internal functions

T
template-things: Internal generic functions
template-things: Internal generic functions
tokenize-template-string: Internal functions

Jump to:   (  
E   F   G   L   M   P   T  

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

A.3 Variables

Jump to:   *   +  
C   S   T  
Index Entry  Section

*
*template-formatters*: Exported special variables

+
+not-found+: Internal constants

C
Constant, +not-found+: Internal constants

S
Slot, things: Internal classes
Special Variable, *template-formatters*: Exported special variables

T
things: Internal classes

Jump to:   *   +  
C   S   T  

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

A.4 Data types

Jump to:   C   J   P   S   T  
Index Entry  Section

C
Class, template: Internal classes

J
json-template: The json-template system
json-template: The json-template package

P
Package, json-template: The json-template package

S
System, json-template: The json-template system

T
template: Internal classes

Jump to:   C   J   P   S   T