Skip to content

Commit d439c5a

Browse files
committed
Final fixes in readme
1 parent 101f56b commit d439c5a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Currently supported file types:
2727
- `read_parquet` and `write_parquet`
2828
- `read_rdata` (.rdata and .rds)
2929
- `read_gsheet` and `write_gsheet` (Google Sheets)
30+
- `read_json` and `write_json`
3031

3132
Agnostic read and write functions that detect the type and dispatch the appropriate function.
3233
- `read_file` and `write_file`

src/gen_fxn.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ function read_file(filepath::String, args...; kwargs...)
2727
return read_parquet(filepath, args...; kwargs...)
2828
elseif ext == ".rds" || ext == ".RData" || ext == ".rdata"
2929
return RData.load(filepath)
30+
elseif ext == ".json"
31+
return read_json(filepath, args...; kwargs...)
3032
else
3133
error("Unsupported file format: $ext")
3234
end
@@ -57,6 +59,8 @@ function write_file(data::DataFrame,path::String, args...; kwargs...)
5759
return write_arrow(data, path, args...; kwargs...)
5860
elseif ext == ".parquet"
5961
return write_parquet(data, path, args...; kwargs...)
62+
elseif ext == ".json"
63+
return write_json(data, path, args...; kwargs...)
6064
else
6165
error("Unsupported file format: $ext")
6266
end

0 commit comments

Comments
 (0)