OSDN Git Service

Merge branch 'v04' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v04
[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