Skip to content

Commit

Permalink
Changed intertypes write for Vector{T} to prevent erroring on empty v…
Browse files Browse the repository at this point in the history
…ectors.
  • Loading branch information
p-stokes committed Dec 12, 2023
1 parent 813a4e1 commit a39c205
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/intertypes/json.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function read(format::JSONFormat, ::Type{Vector{T}}, s::JSON3.Array) where {T}
end
function write(io::IO, format::JSONFormat, d::Vector{T}) where {T}
print(io, "[")
joinwith(io, (io, x) -> write(io, format, x), d, ",")
if length(d) > 0 joinwith(io, (io, x) -> write(io, format, x), d, ",") end
print(io, "]")
end

Expand Down

0 comments on commit a39c205

Please sign in to comment.