-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
xref quinnj/JSON3.jl#113 & JuliaData/StructTypes.jl#35
I think Strapping should follow the behavior of JSON3 with respect to Ordered / Unordered? Simple repro below
import StructTypes
import Strapping
struct Person
name::String
id::Int
end
StructTypes.StructType(::Type{Person}) = StructTypes.UnorderedStruct() # aka StructTypes.Struct()
julia> Strapping.construct(Person, [(; name="Bob", id=1)])
Person("Bob", 1)
julia> Strapping.construct(Person, [(; id=1, name="Bob")])
ERROR: MethodError: no method matching String(::Int64)Metadata
Metadata
Assignees
Labels
No labels