Sha256: 2c5552e0ae2f1ac90a38bb68055f6e11e2422904b2e83dbf3d47085fa102f650

Contents?: true

Size: 241 Bytes

Versions: 32

Compression:

Stored size: 241 Bytes

Contents

# frozen_string_literal: true

module StringExtensions
  refine String do
    def json_to_hash
      ::JSON.parse(self)
    rescue ::JSON::ParserError
      # logger.error "##{__method__} => Unable to parse JSON response."
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
finapps_core-4.0.6 lib/core_extensions/string/json_to_hash.rb
finapps_core-4.0.5 lib/core_extensions/string/json_to_hash.rb
finapps_core-4.0.4 lib/core_extensions/string/json_to_hash.rb
finapps_core-4.0.3 lib/core_extensions/string/json_to_hash.rb
finapps_core-4.0.2 lib/core_extensions/string/json_to_hash.rb
finapps_core-4.0.0 lib/core_extensions/string/json_to_hash.rb
finapps_core-3.0.6 lib/core_extensions/string/json_to_hash.rb
finapps_core-3.0.5 lib/core_extensions/string/json_to_hash.rb
finapps_core-3.0.3 lib/core_extensions/string/json_to_hash.rb
finapps_core-3.0.1 lib/core_extensions/string/json_to_hash.rb
finapps_core-2.1.2 lib/core_extensions/string/json_to_hash.rb
finapps_core-2.1.1 lib/core_extensions/string/json_to_hash.rb