Class: String
Instance Method Summary collapse
Instance Method Details
#is_json? ⇒ Boolean
2 3 4 5 6 7 8 |
# File 'lib/noahutils.rb', line 2 def is_json? begin !!JSON.parse(self) rescue false end end |
2 3 4 5 6 7 8 |
# File 'lib/noahutils.rb', line 2 def is_json? begin !!JSON.parse(self) rescue false end end |