diff --git a/lib/typed/json_serializer.rb b/lib/typed/json_serializer.rb index bb0542c..2011d14 100644 --- a/lib/typed/json_serializer.rb +++ b/lib/typed/json_serializer.rb @@ -7,9 +7,9 @@ class JSONSerializer < Serializer Input = type_member { {fixed: String} } Output = type_member { {fixed: String} } - sig { override.params(sourcer: Input).returns(Result[T::Struct, DeserializeError]) } - def deserialize(sourcer) - parsed_json = JSON.parse(sourcer) + sig { override.params(source: Input).returns(Result[T::Struct, DeserializeError]) } + def deserialize(source) + parsed_json = JSON.parse(source) creation_params = schema.fields.each_with_object(T.let({}, Params)) do |field, hsh| hsh[field.name] = parsed_json[field.name.to_s]