OSDN Git Service
(root)
/
pettanr
/
pettanr.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
add json parser on common
[pettanr/pettanr.git]
/
lib
/
common.rb
1
require 'json'
2
3
module JSON
4
def self.parse_no_except(data)
5
res = data
6
begin
7
res = JSON.parse(data) if data.is_a?(String)
8
rescue
9
return false
10
end
11
res
12
end
13
end
14