TeamCo AntHill
Monday, October 4, 2010
Check if string has JSON inside
module
JSON
def
is_json?
(
string
)
begin
parse
(
string
).
all?
rescue
ParserError
false
end
end
end
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment