iZettle/api-model

View on GitHub
lib/api_model/response_parser/json.rb

Summary

Maintainability
A
0 mins
Test Coverage
module ApiModel
  module ResponseParser
    class Json

      def parse(body)
        JSON.parse body
      rescue JSON::ParserError
        Log.info "Could not parse JSON response: #{body}"
        return nil
      end

    end
  end
end