quinnj / JSON3.jl

Other
214 stars 47 forks source link

Handling of multi-dimensional arrays #196

Open hhaensel opened 2 years ago

hhaensel commented 2 years ago

Multidimensional arrays are written as flattened arrays. Is this on purpose, maybe because it's faster? Other JSON packages use nested arrays.

julia> using JSON

julia> json([1 2 3; 4 5 6])
"[[1,4],[2,5],[3,6]]"

julia> using JSON3

julia> JSON3.write([1 2 3; 4 5 6])
"[1,4,2,5,3,6]"