How to specify ranges in YAML?

后端 未结 3 2436
终归单人心
终归单人心 2021-02-20 16:07

I can express

3rd page is the title page

in YAML

title: 3

What about the following?

3条回答
  •  渐次进展
    2021-02-20 16:52

    There is not direct way to specify ranges in YAML, but some YAML can store serialized objects, for example in Ruby:

    ...
    normal range: !ruby/range 10..20 
    exclusive range: !ruby/range 11...20 
    negative range: !ruby/range -1..-5 
    ...
    

    Look here

提交回复
热议问题