Glot.Jsonl (Glot v0.1.2)

View Source

Jsonlines is simpler than JSON, because each line can be parsed separatelly. This makes it useful for large files, that still need some structure (CSV falls short here).

Summary

Functions

Reads a file with JSON-lines, returning {:ok, rows} or {:error, reason}

Functions

list_to_jsonl(list_of_maps)

read_from_file(file_path)

Reads a file with JSON-lines, returning {:ok, rows} or {:error, reason}

read_from_file!(file_path)

write_to_file(file_path, list_of_maps)

Writes JSONLines (https://jsonlines.org/examples/) to a file.