module JSON
Public Class Methods
is_json?(foo)
click to toggle source
# File lib/gumiho/route_methods.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