Skip to content

Commit

Permalink
support serializing a vector of strings
Browse files Browse the repository at this point in the history
  • Loading branch information
aplavin authored Nov 13, 2024
1 parent 3e10d39 commit 631e18d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/serialize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ function serialize!(val::AbstractString, ctx)
print(ctx, '\'', val, '\'')
end

function serialize!(val::AbstractVector{<:AbstractString}, ctx)
print(ctx, '[')
for (i, v) in enumerate(val)
i == 1 || print(ctx, ", ")
serialize!(v, ctx)
end
print(ctx, ']')
end

serialize!(val::Dates.AbstractTime, ctx) =
print(ctx, '\'', val, '\'')

Expand Down

0 comments on commit 631e18d

Please sign in to comment.