When working with arrays of objects it seems sometimes better to prettify the array (i.e. add a newline between consecutive objects of the array), but not prettify the objects themselves).
As an example, let's assume one has arrays objects defined as
struct Foo
bar::Float64
baz::Float64
end
The default json of a Vector{Foo} (assuming Foo is declared as an OrderedStruct) would look like
as a result. This option could be set a bit like with the StructTypes traits with Prettyfiable(::Type{Foo}) = false or something equivalent
The same argument could be relevant for some small arrays of types e.g. an array of 5 numbers that is currently print with one number per line.
When working with arrays of objects it seems sometimes better to prettify the array (i.e. add a newline between consecutive objects of the array), but not prettify the objects themselves).
As an example, let's assume one has arrays objects defined as
The default json of a
Vector{Foo}
(assumingFoo
is declared as anOrderedStruct
) would look likeThe idea of this feature request would be to have something like a
noprettify
option that would allow to get e.g.as a result. This option could be set a bit like with the
StructTypes
traits withPrettyfiable(::Type{Foo}) = false
or something equivalent The same argument could be relevant for some small arrays of types e.g. an array of 5 numbers that is currently print with one number per line.