Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the cl-json-helper Reference Manual, version 1.1.0, generated automatically by Declt version 3.0 "Montgomery Scott" on Tue Dec 22 12:26:29 2020 GMT+0.
• Introduction | What cl-json-helper is all about | |
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
###cl-json-helper: A Common Lisp library to assist cl-json.
cl-json encodes and decodes JSON data. cl-json-helper adds two functions to help encoding JSON data and one function to help in processing decoded JSON data.
The nickname xjson can be used for the cl-json-helper package.
[Function] json-empty ()
The return value is decoded by cl-json as {}.
Example:
(cl-json:encode-json-to-string `(("Empty" . ,(xjson:json-empty))))
=> "{\"Empty\":{}}"
[Function] json-bool (val)
Encodes val as "true" or "false"
Examples:
(cl-json:encode-json-to-string `(("TRUE" . ,(xjson:json-bool t))))
=> "{\"TRUE\":true}"
(cl-json:encode-json-to-string `(("FALSE" . ,(xjson:json-bool nil))))
=> "{\"FALSE\":false}"
[Function] json-key-value (key list &key (test #'eql))
Return the value associated with _key_ in a decoded JSON list, if present, and whether
or not _key_ was found.
(cl-json:encode-json-to-string '(("HELLO" . "WORLD")
("ITS" . "ME")
("CEST" . "MOI")))
=> "{\"HELLO\":\"WORLD\",\"ITS\":\"ME\",\"CEST\":\"MOI\"}"
(cl-json:decode-json-from-string "{\"HELLO\":\"WORLD\",\"ITS\":\"ME\",\"CEST\":\"MOI\"}")
=> ((:+HELLO+ . "WORLD") (:+ITS+ . "ME") (:+CEST+ . "MOI"))
(xjson:json-key-value :+CEST+ '((:+HELLO+ . "WORLD") (:+ITS+ . "ME") (:+CEST+ . "MOI")))
=> "MOI"
T
(xjson:json-key-value :+FALSE+ (cl-json:decode-json-from-string "{\"FALSE\":false}"))
=> NIL
T
(xjson:json-key-value :+BAR+ (cl-json:decode-json-from-string "{\"FALSE\":false}"))
=> NIL
NIL
json-key-value is just a glorified call to Lisp's assoc
https://github.com/stablecross/cl-json-helper
####License cl-json-helper is available under a BSD-like license. See the file LICENSE for details.
For any questions or comments, please feel free to email me, Bob Felts wrf3@stablecross.com
Next: Files, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The cl-json-helper system |
Bob Felts <wrf3@stablecross.com>
BSD
Handy extras for cl-json
1.1.0
cl-json
cl-json-helper.asd (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
• The cl-json-helper.asd file | ||
• The cl-json-helper/package.lisp file | ||
• The cl-json-helper/cl-json-helper.lisp file |
Next: The cl-json-helper/package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
cl-json-helper.asd
cl-json-helper (system)
Next: The cl-json-helper/cl-json-helper․lisp file, Previous: The cl-json-helper․asd file, Up: Lisp files [Contents][Index]
cl-json-helper (system)
package.lisp
Previous: The cl-json-helper/package․lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
cl-json-helper (system)
cl-json-helper.lisp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The cl-json-helper package |
package.lisp (file)
xjson
common-lisp
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported functions |
Previous: Exported definitions, Up: Exported definitions [Contents][Index]
cl-json-helper.lisp (file)
cl-json-helper.lisp (file)
cl-json-helper.lisp (file)
cl-json-helper.lisp (file)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal special variables | ||
• Internal functions | ||
• Internal classes |
Next: Internal functions, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
cl-json-helper.lisp (file)
cl-json-helper.lisp (file)
Next: Internal classes, Previous: Internal special variables, Up: Internal definitions [Contents][Index]
cl-json-helper.lisp (file)
Previous: Internal functions, Up: Internal definitions [Contents][Index]
cl-json-helper.lisp (file)
standard-object (class)
cl-json-helper.lisp (file)
standard-object (class)
encode-json (method)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | C F L |
---|
Jump to: | C F L |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | F J V |
---|
Jump to: | F J V |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | *
S |
---|
Jump to: | *
S |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | C J P S |
---|
Jump to: | C J P S |
---|