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

Multidimensional Arrays lose dimensions when written, and can't be parsed.

Open blairn opened this issue 7 years ago • 0 comments

An Array{Bool,2} will be written as a Array{Bool,1} rather than an array of arrays. you of course don't have all the info required to parse it back into an Array{Bool,2}

If you try, you will get MethodError: no method matching Array{Bool,2}(::Array{Any,1})

The current work around is storing the dimensions separately and storing / loading it as a Vector, and reshaping it from there.

blairn avatar Nov 13 '18 22:11 blairn