RJson.rb 为json格式,提供扩展的脚本
RJson.rb为json格式,提供扩展的脚本。使用说明:注释:每行以"#"开头为注释。声明block:以def开头的行为block开始,end结束,def后跟block名字。引用block:文本中出现#{block_name},替换为声明过的block。使用方式: ruby json_conv.rb source.rjson dest.josn source.rjson: #def区def welcome_image_url thttp://xxx.png end def welcome_image { t"type": "image", "dataBinding": { "url": "#{welcome_image_url}" } } end def hello_world_str thello_world end #json区{ t"
下载地址
用户评论