浏览 5722 次
锁定老帖子 主题:Jymal
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2006-10-23   最后修改:2009-07-19
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 请登录后投票
论坛首页 编程语言技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics