JSON3.jl
JSON3.jl copied to clipboard
`JSON3.read` doesn't call `construct(T, args...; kw...)` for `Struct` types
It calls the object constructor but not StructTypes.construct
, which violates the StructTypes
API.
Ah, this is actually a bug in StructTypes itself, the definition of @inline function construct(values::Vector{Any}, ::Type{T}) where {T}
takes a Vector{Any}
and constructs T
, but doesn't call construct
, it just calls T(...)
. Should be pretty easy to fix if someone wants to make a PR to StructTypes.jl.
Thanks for reporting!