论坛首页 Ruby版 YAML

Jymal

浏览 3267 次
锁定老贴子 主题:Jymal
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
时间:2006-10-23
http://jyaml.sourceforge.net/



用法简单
Direct mapping to programming objects with JYaml

With JYaml, entities in a Yaml file are directly mapped into programming objects. This means interaction with the library will be very simple, in most cases requiring only one method call. For example, the following Yaml file

date: 11/29/2005
receipts:
- store: ken stanton music
category: entertainment
description: saxophone repair
total: 382.00
- store: walmart
category: groceries
total: 14.26

transforms into the following data structure

with just the following line of code

Entry entry = Yaml.loadType(new File("ReceiptEntry.yml"),
Entry.class);

图示关系


YAML不是Ruby的专利
   
时间:2006-10-23
有点意思啊,Java版本的YAML!非常棒!!!
   
0 请登录后投票
论坛首页 Ruby版 YAML

跳转论坛:
JavaEye推荐