Skip to content

Commit

Permalink
fixed read function 2
Browse files Browse the repository at this point in the history
  • Loading branch information
cecoeco committed Aug 18, 2024
1 parent 348b207 commit 98099dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/checklist.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ using PRISMA
df = checklist_df()
checklist_save("checklist.csv", df)
checklist_save("checklist.csv", df)
checklist_save("checklist.xlsx", df)
checklist_save("checklist.html", df; editable=true)
checklist_save("checklist.json", df)
Expand Down Expand Up @@ -297,7 +297,7 @@ using PRISMA: Checklist, checklist, checklist_save
clist::Checklist = checklist("manuscript.pdf")
checklist_save("checklist.csv", clist)
checklist_save("checklist.csv", clist)
checklist_save("checklist.xlsx", clist)
checklist_save("checklist.json", clist)
checklist_save("checklist.html", clist)
Expand Down Expand Up @@ -341,7 +341,7 @@ using DataFrames: DataFrame
df::DataFrame = checklist_df()
checklist_save("checklist.csv", df)
checklist_save("checklist.csv", df)
checklist_save("checklist.xlsx", df)
checklist_save("checklist.json", df)
checklist_save("checklist.html", df)
Expand Down Expand Up @@ -371,7 +371,7 @@ reads the template data from a `CSV`, `XLSX`, `HTML`, or `JSON`
- `fn::AbstractString`: the name of the file to read
- `sheetname::AbstractString="": the name of the sheet in the spreadsheet
- `kwargs...`: additional arguments to be passed to the underlying
`CSV.read`, `XLSX.readtable`, `HTMLTables.read`, and `JSONTables.jsontable` functions
`CSV.read`, `XLSX.readtable`, `HTMLTables.read`, and `JSON3.read` functions
## Returns
Expand All @@ -382,7 +382,7 @@ reads the template data from a `CSV`, `XLSX`, `HTML`, or `JSON`
```julia
using PRISMA: checklist_save, checklist_df, checklist_read
checklist_save("checklist.csv", checklist_df())
checklist_save("checklist.csv", checklist_df())
checklist_save("checklist.xlsx", checklist_df())
checklist_save("checklist.json", checklist_df())
checklist_save("checklist.html", checklist_df())
Expand Down
2 changes: 1 addition & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function read_as_dataframe(
elseif ext == ".html"
return HTMLTables.read(fn, DataFrame; kwargs...)
elseif ext == ".json"
return DataFrame(JSONTables.jsontable(fn; kwargs...))
return DataFrame(JSONTables.jsontable(JSON3.read(fn; kwargs...)))
else
return throw(ArgumentError("unsupported file extension: $ext"))
end
Expand Down

0 comments on commit 98099dc

Please sign in to comment.