#attribute isn't set in JSON::SerializableError when an attribute is missing in json:
require "json"
struct Foo
include ::JSON::Serializable
def initialize(@name : String)
end
end
begin
Foo.from_json %({})
rescue e : ::JSON::SerializableError
pp e.attribute # => nil
end
Any reason for it not to be set? It's included in the message.