Exception: Typed::DeserializeError

Inherits:
SerializationError show all
Extended by:
T::Sig
Defined in:
lib/typed/deserialize_error.rb

Direct Known Subclasses

ParseError, Validations::ValidationError

Instance Method Summary collapse

Instance Method Details

#to_hObject



8
9
10
# File 'lib/typed/deserialize_error.rb', line 8

def to_h
  {error: message}
end

#to_json(_options = {}) ⇒ Object



13
14
15
# File 'lib/typed/deserialize_error.rb', line 13

def to_json(_options = {})
  JSON.generate(to_h)
end