Skip to content

Commit

Permalink
undo change
Browse files Browse the repository at this point in the history
  • Loading branch information
tbconroy committed Jul 17, 2024
1 parent aac84a8 commit 7249936
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/typed/json_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 7249936

Please sign in to comment.