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-6.0.2 lib/core_extensions/string/json_to_hash.rb
finapps_core-6.0.1 lib/core_extensions/string/json_to_hash.rb
finapps_core-6.0.0 lib/core_extensions/string/json_to_hash.rb
finapps_core-5.0.16 lib/core_extensions/string/json_to_hash.rb
finapps_core-5.0.15 lib/core_extensions/string/json_to_hash.rb
finapps_core-5.0.14 lib/core_extensions/string/json_to_hash.rb
finapps_core-5.0.13 lib/core_extensions/string/json_to_hash.rb
finapps_core-5.0.11 lib/core_extensions/string/json_to_hash.rb
finapps_core-5.0.10 lib/core_extensions/string/json_to_hash.rb
finapps_core-5.0.9 lib/core_extensions/string/json_to_hash.rb
finapps_core-5.0.8 lib/core_extensions/string/json_to_hash.rb
finapps_core-5.0.7 lib/core_extensions/string/json_to_hash.rb
finapps_core-5.0.6 lib/core_extensions/string/json_to_hash.rb
finapps_core-5.0.5 lib/core_extensions/string/json_to_hash.rb
finapps_core-5.0.4 lib/core_extensions/string/json_to_hash.rb
finapps_core-5.0.3 lib/core_extensions/string/json_to_hash.rb
finapps_core-5.0.2 lib/core_extensions/string/json_to_hash.rb
finapps_core-5.0.1 lib/core_extensions/string/json_to_hash.rb
finapps_core-5.0.0 lib/core_extensions/string/json_to_hash.rb
finapps_core-4.0.7 lib/core_extensions/string/json_to_hash.rb