Sha256: 0c22c8aaf2cdf6923399db173546f1f318c58db4d36bfd8a6761e221a05decc8

Contents?: true

Size: 240 Bytes

Versions: 29

Compression:

Stored size: 240 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

29 entries across 29 versions & 2 rubygems

Version Path
finapps_core-2.0.20 lib/core_extensions/string/json_to_hash.rb
finapps_core-2.0.19 lib/core_extensions/string/json_to_hash.rb
finapps_core-2.0.18 lib/core_extensions/string/json_to_hash.rb
finapps_core-2.0.17 lib/core_extensions/string/json_to_hash.rb
finapps_core-2.0.16 lib/core_extensions/string/json_to_hash.rb
finapps_core-2.0.15 lib/core_extensions/string/json_to_hash.rb
finapps_core-2.0.14 lib/core_extensions/string/json_to_hash.rb
finapps_core-2.0.13 lib/core_extensions/string/json_to_hash.rb
finapps_core-2.0.12 lib/core_extensions/string/json_to_hash.rb
finapps_core-2.0.11 lib/core_extensions/string/json_to_hash.rb
finapps_core-2.0.10 lib/core_extensions/string/json_to_hash.rb
finapps_core-2.0.9 lib/core_extensions/string/json_to_hash.rb
finapps_core-2.0.8 lib/core_extensions/string/json_to_hash.rb
finapps_core-2.0.7 lib/core_extensions/string/json_to_hash.rb
finapps_core-2.0.6 lib/core_extensions/string/json_to_hash.rb
finapps_core-2.0.5 lib/core_extensions/string/json_to_hash.rb
finapps_core-2.0.4 lib/core_extensions/string/json_to_hash.rb
finapps_core-2.0.3 lib/core_extensions/string/json_to_hash.rb
finapps_core-2.0.2 lib/core_extensions/string/json_to_hash.rb
finapps-2.1.4 lib/core_extensions/string/json_to_hash.rb