在厨师角色中包含评论的最佳方式是什么?

时间:2016-06-24 07:21:37

标签: ruby chef

我想在厨师角色中加入评论。

{
    "name" : "custom_chef_role",
    "json_class" : "Chef::Role",
    "default_attributes" : {},
    "override_attributes" : {
        "role_consul" : {
            "cluster" : {

                /* Adding environment name */
                "name" : "cybsnonprod",
    }
    },
    "chef_type" : "role",
    "run_list" : [
    ],
    "env_run_lists" : {}
}

如果包含以下评论是正确的,请告诉我:

  /* Adding environment name */

1 个答案:

答案 0 :(得分:2)

JSON通常不支持注释,但正巧使用的JSON库确实使用您显示的语法来支持它们。这可能会破坏一些使用其他库加载JSON对象的辅助工具,因此请注意这一点。

相关问题