From 00aabb4381d1c7564b3341f8a7e94426237ca041 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Mon, 8 May 2017 12:47:52 +0200 Subject: Add README. --- README.md | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..454520f --- /dev/null +++ b/README.md @@ -0,0 +1,71 @@ +# JSON Template for Common Lisp + +## Summary + +An implementation of [JSON Template][] in Common Lisp. + +## Implementation Features + + * No dependencies + * Portable Common Lisp (tested + on [SBCL][], [Clozure CL][], [ECL][], [XCL][], [ABCL][]) + * HTML and URI escaping through the use of formatters + * Apache license + +## Missing Things + + * Literals (like `{.space}` and `{.meta-left}`/`{.meta-right}`) + * Multiple-argument formatters + * Options (like changing the meta character or the default formatter) + * Some kind of compilation for efficiency + +## Examples + +```lisp +JSON-TEMPLATE> (defparameter *tmpl* (parse-template-string " +

{title|html}

+{.section people} + +{.or} +

No one's registered.

+{.end}")) +*TMPL* +``` + +```lisp +JSON-TEMPLATE> (expand-template *tmpl* + '(:title "" + :people ((:name "Nathalie" :age 24) + (:name "Heinrich" :age 28) + (:name "Hans" :age 25)))) +" +

<Registered People>

+ +" +``` + +```lisp +JSON-TEMPLATE> (expand-template *tmpl* + '(:title "" + :people ())) +" +

<Registered People>

+

No one's registered.

+" +``` + + +[JSON Template]: http://jsont.squarespace.com +[SBCL]: http://www.sbcl.org/ +[Clozure CL]: http://ccl.clozure.com/ +[ECL]: http://ecls.sf.net/ +[XCL]: https://github.com/gnooth/xcl +[ABCL]: http://common-lisp.net/project/armedbear/ -- cgit v1.2.3