From a39c2055c5f3883dcfb9ac4c71c11c534832c162 Mon Sep 17 00:00:00 2001 From: p-stokes Date: Tue, 12 Dec 2023 12:06:39 -0500 Subject: [PATCH] Changed intertypes write for Vector{T} to prevent erroring on empty vectors. --- src/intertypes/json.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intertypes/json.jl b/src/intertypes/json.jl index c220e35..6efc8e2 100644 --- a/src/intertypes/json.jl +++ b/src/intertypes/json.jl @@ -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