Std.Json.foldLines
1 declaration
fn
foldLines: Str -> T -> fn(T, Std.Json.Json) -> T -> Result[T, Std.Json.JsonLinesError]This is a callable function.
What it does
Combine every value of a JSON Lines file, one value to a line, holding one
chunk of the file at a time.
A line holding only whitespace is skipped, so a file that ends with a blank
line is still read. Values before a malformed line have already reached
step; after it, the rest of the file is read without further work.
Read the signature
- The text after the name is the type checked by Pudu.
- Read arrows from left to right: inputs come first, and the final type is returned.
- Names inside [ ] are type arguments, such as the item type held by a collection.
- Result makes success and recoverable failure part of the function's type.
