JSON for Ruby
- 授权协议: Ruby License
- 开发语言: Ruby
- 操作系统: 跨平台
- 软件首页: http://json.rubyforge.org/
软件介绍
这是一个 Ruby 语言用来操作 JSON 格式数据的程序库。
安装方法:gem install json
代码示例:
class Range
def to_json(*a)
{
'json_class' => self.class.name,
'data' => [ first, last, exclude_end? ]
}.to_json(*a)
end
def self.json_create(o)
new(*o['data'])
end
end
JSON:JavaScript Object Notation