New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Choose JSON Renderer due to bug in JSON3/StructTypes #636
Comments
Are you talking about Genie or Stipple? For Stipple, I just committed a change that supports parsing list of lists into a matrix. ] add Stipple#master @essenciary We could opt to render Matrices as list of lists. With the above commit, you can always opt in to rendering matrices as list of lists by Stipple.render(val::Matrix, fieldname::Union{Nothing, Symbol}) = collect(eachrow(val)) and communication in Stipple apps should be ok. |
I don't know what Stipple is yet. I'm talking about Genie. |
Stipple.jl is part of the GenieFramework. |
I'll pick this up in a couple days, thanks for the advice I'll look at Stipple. |
As the JSON3 issue is still open, looks like a good time to add a choice of JSON serializers (between JSON and JSON3) with JSON3 as the default, in Genie. |
I'm working on an API that needs to serialize a matrix. The JSON.jl package outputs the following
Which are the results I expect. The JSON3.jl package flattens the array without any information about the original dimensions.
Because of #304 the Genie JSON renderer uses JSON3, so I have to make my own renderer. The upstream projects have open issues[1][2] to address this unexpected type behavior but it doesn't look like anyone is working them. It would be nice to perhaps add a keyword argument to the Genie renderer to choose which backing package to use.
[1] quinnj/JSON3.jl#196
[2] JuliaData/StructTypes.jl#14
The text was updated successfully, but these errors were encountered: