Crate jsonl

Source
Expand description

An implementation of JSON Lines for Rust.

JSON Lines is a simple format consisting of JSON values separated by newlines. Use read() and write() to interact wtih readers and writers in the JSON Lines format. Serialization and deserialization is done automatically.

See Connection for situations in which you have both a reader and a writer and would like to bundle them up together.

Enable the tokio feature to replace the usages of std IO primitives with those from Tokio.

Structs§

Connection
Use this type when you have both a reader and writer, and want them to be grouped together.

Enums§

ReadError
An error that occurred during reading.
WriteError
An error that occurred during writing.

Functions§

read
Reads a line from the reader and deserializes it into a given type.
write
Writes a given value to the writer, serializing it into JSON.