Functionsยง
- count_
lines - Counts the lines in
text. - read_
json - Reads a single JSON document and returns it wrapped in a one-element
Vec. - read_
jsonl - Reads a JSONL file and returns one
Valueper non-empty line. - save_
json_ pretty - Serializes
valueas pretty-printed JSON and writes it topath. - write_
json_ atomic - Serializes
valueas compact JSON and writes it topathatomically. - write_
json_ atomic_ pretty - Like
write_json_atomicbut pretty-prints the JSON. - write_
string_ atomic - Writes
contentstopathatomically (temp file in the same dir, fsync, rename), so a concurrent reader never observes a partial file.