module JSON
monkey patch for json
Public Class Methods
is_json?(foo)
click to toggle source
# File lib/stub_hub_api/response.rb, line 6 def self.is_json?(foo) begin return false unless foo.is_a?(String) JSON.parse(foo).all? rescue JSON::ParserError false end end