You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@kwdef struct Person
name::String
fingers::Int=2
end
StructTypes.excludes(::Type{Human}) = (:fingers,)
In the above example, JSON3.write(Person("John")) returns {"name":"John"} as expected. However when we deserialize, we get Cannot `convert` an object of type Nothing to an object of type Int. Instead of setting fingers to nothing, it should probably call a constructor without fingers so that it sets default value 2?