JLD.jl icon indicating copy to clipboard operation
JLD.jl copied to clipboard

Slashes in dictionary keys

Open lhupe opened this issue 5 years ago • 1 comments
trafficstars

JLD seems to interpret slashes in dictionary keys as a group hierarchy, as demonstrated by this MWE,

using JLD

data = Dict(
    "/foo/bar" => "some data",
    "/foo/baz" => "more data"
)

JLD.save("mwe.jld", data)

data2 = JLD.load("mwe.jld")
println(data2)

which will print

Dict{String,Any}("foo" => Dict{String,Any}("bar" => "some data","baz" => "more data"))

Is this an undocumented feature or a bug?

lhupe avatar Jul 02 '20 11:07 lhupe

I noticed that in the docs file, this behaviour is used without explicitely explaining what it does, so I guess this counts as a feature. It'd be nice if it were documented explicitely, because to users without a basic knowledge of HDF5, this might be a bit confusing.

lhupe avatar Aug 13 '20 07:08 lhupe