Returns:
2 3 4 5 6 7 8 9
# File 'lib/ruby_cpu/core_ext/json/is_json.rb', line 2 def self.is_json?(text) begin return false unless text.is_a?(String) !!JSON.parse(text) rescue JSON::ParserError false end end