Skip to content

Commit

Permalink
Update marshaller.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
AlemaoEc authored Feb 29, 2024
1 parent 6f38a5a commit d5c3f96
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions lib/jets/overrides/lambda/marshaller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ def marshall_response(method_response)
# Orignal method calls .to_json but this collides with ActiveSupport's to_json
# method_response.to_json # application/json is assumed
# https://stackoverflow.com/questions/18067203/ruby-to-json-issue-with-error-illegal-malformed-utf-8
if method_response.is_a?(Hash)
method_response.deep_transform_values! do |v|
if v.respond_to?(:force_encoding) && !v.frozen?
v.force_encoding("ISO-8859-1").encode("UTF-8")
else
v # IE: Integer
end
end
end
JSON.dump(method_response)
end
end
Expand Down

0 comments on commit d5c3f96

Please sign in to comment.