| Title: | R Bindings for TOON Format |
|---|---|
| Description: | Provides R bindings for reading and writing TOON (Token-Oriented Object Notation) format files. TOON is a lightweight, human-readable data serialization format. This package uses Rust for fast parsing and encoding. |
| Authors: | Dyfan Jones [aut, cre] |
| Maintainer: | Dyfan Jones <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.0.9000 |
| Built: | 2026-05-25 06:10:25 UTC |
| Source: | https://github.com/DyfanJones/toonfmt |
Parse TOON data from connection and return the parsed data as an R object.
read_toon_conn(conn, strict = TRUE, coerce_types = TRUE, int64 = "double")read_toon_conn(conn, strict = TRUE, coerce_types = TRUE, int64 = "double")
conn |
A connection object (e.g., from |
strict |
Use strict mode for parsing (default: true) |
coerce_types |
Enable automatic type coercion (default: true) |
int64 |
How to handle large integers: "double" (default), "string", or "bit64" |
Read a TOON file and return the parsed data as an R object.
read_toon_file(path, strict = TRUE, coerce_types = TRUE, int64 = "double")read_toon_file(path, strict = TRUE, coerce_types = TRUE, int64 = "double")
path |
Path to the TOON file |
strict |
Use strict mode for parsing (default: true) |
coerce_types |
Enable automatic type coercion (default: true) |
int64 |
How to handle large integers: "double" (default), "string", or "bit64" |
Parse TOON data from raw bytes and return the parsed data as an R object.
read_toon_raw(raw_bytes, strict = TRUE, coerce_types = TRUE, int64 = "double")read_toon_raw(raw_bytes, strict = TRUE, coerce_types = TRUE, int64 = "double")
raw_bytes |
Raw bytes containing TOON format data |
strict |
Use strict mode for parsing (default: true) |
coerce_types |
Enable automatic type coercion (default: true) |
int64 |
How to handle large integers: "double" (default), "string", or "bit64" |
Parse a TOON string and return the parsed data as an R object.
read_toon_str(toon_str, strict = TRUE, coerce_types = TRUE, int64 = "double")read_toon_str(toon_str, strict = TRUE, coerce_types = TRUE, int64 = "double")
toon_str |
TOON format string |
strict |
Use strict mode for parsing (default: true) |
coerce_types |
Enable automatic type coercion (default: true) |
int64 |
How to handle large integers: "double" (default), "string", or "bit64" |
Write an R object to a TOON file.
write_toon_file(data, path, delimiter = ",", pretty = FALSE)write_toon_file(data, path, delimiter = ",", pretty = FALSE)
data |
R object to encode (list, vector, etc.) |
path |
Path where the TOON file will be written |
delimiter |
Delimiter character: |
pretty |
Use pretty formatting with default indentation (default: FALSE) |
Convert an R object to TOON format and return as raw bytes.
write_toon_raw(data, delimiter = ",", pretty = FALSE)write_toon_raw(data, delimiter = ",", pretty = FALSE)
data |
R object to encode (list, vector, etc.) |
delimiter |
Delimiter character: |
pretty |
Use pretty formatting with default indentation (default: FALSE) |
Convert an R object to a TOON format string.
write_toon_str(data, delimiter = ",", pretty = FALSE)write_toon_str(data, delimiter = ",", pretty = FALSE)
data |
R object to encode (list, vector, etc.) |
delimiter |
Delimiter character: |
pretty |
Use pretty formatting with default indentation (default: FALSE) |