The cl-jsonl Reference Manual

This is the cl-jsonl Reference Manual, version 0.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 15:21:58 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 cl-jsonl

Lazy read JSONL files with each line a separate definition.

Author

Paul Landes <>

License

MIT

Version

0.1.0

Dependencies
  • gtwiwtg (system).
  • yason (system).
Source

cl-jsonl.asd.

Child Component

jsonl.lisp (file).


3 Files

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


3.1 Lisp


3.1.1 cl-jsonl/cl-jsonl.asd

Source

cl-jsonl.asd.

Parent Component

cl-jsonl (system).

ASDF Systems

cl-jsonl.


3.1.2 cl-jsonl/jsonl.lisp

Source

cl-jsonl.asd.

Parent Component

cl-jsonl (system).

Packages

cl-jsonl.

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 cl-jsonl

A ‘gtwiwtg::generator!’ class that iterates over JSON entries in files. Only ‘with-json-reader’ should be used, which closes the iterator when the end of file is not reached, which happens when only the first N blobs are parsed.

Source

jsonl.lisp.

Use List
  • common-lisp.
  • gtwiwtg.
Public Interface

with-json-reader (macro).

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-reader ((gen file-name) &body body)

Iterate ‘gtwiwtg’ generator GEN through FILE-NAME each entry.
Each iteration reads a line from the file and parses it as a JSON string.

Package

cl-jsonl.

Source

jsonl.lisp.


5.1.2 Standalone methods

Method: initialize-instance :after ((g json-reader) &key)
Source

jsonl.lisp.


5.2 Internals


5.2.1 Generic functions

Generic Function: json-reader-close (g)
Package

cl-jsonl.

Methods
Method: json-reader-close ((g json-reader))

Close the reader regardless if the end was iterated.

Source

jsonl.lisp.


5.2.2 Standalone methods

Method: has-next-p ((g json-reader))
Package

gtwiwtg.

Source

jsonl.lisp.

Method: next ((g json-reader))

Get the parsed JSON as a hashtable.

Package

gtwiwtg.

Source

jsonl.lisp.


5.2.3 Classes

Class: json-reader

Iterates over multi-line JSON files.

Package

cl-jsonl.

Source

jsonl.lisp.

Direct superclasses

generator!.

Direct methods
Direct slots
Slot: file-name

The JSON file name usually with a ‘.jsonl’ extension.

Initargs

:file-name

Slot: stream
Package

common-lisp.

Slot: next-entry

Appendix A Indexes


A.1 Concepts


A.3 Variables