From 631e18d2648e5406abafe28648f7e78ed800b127 Mon Sep 17 00:00:00 2001 From: Alexander Plavin Date: Wed, 13 Nov 2024 12:55:54 -0500 Subject: [PATCH] support serializing a vector of strings --- src/serialize.jl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/serialize.jl b/src/serialize.jl index bebb4dda..c5103d1f 100644 --- a/src/serialize.jl +++ b/src/serialize.jl @@ -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, '\'')