lib/capistrano_multiconfig_parallel/helpers/application_helper.rb
# Method that is used to parse a string as JSON , if it fails will return nil
# @see JSON#parse
# @param [string] res The string that will be parsed as JSON
# @return [Hash, nil] Returns Hash object if the json parse succeeds or nil otherwise
Method that is used to parse a string as JSON , if it fails will return nil
Method that is used to parse a string as JSON if it fails will return nil
def parse_json(res)
        return if res.blank?
        JSON.parse(res)
      rescue JSON::ParserError
        nil
      end
def parse_json ( res ) return if res . blank? JSON . parse ( res ) rescue JSON :: ParserError nil end
Method that is used to parse a string as JSON , if it fails will return nil
Method that is used to parse a string as JSON if it fails will return nil
Returns Hash object if the json parse succeeds or nil otherwise
Returns Hash object if the json parse succeeds or nil otherwise
Hash, nil
res
<not_specific>
<not_specific>
res The string that will be parsed as JSON
res The string that will be parsed as JSON
see
None